本文整理汇总了PHP中RGForms::get_page方法的典型用法代码示例。如果您正苦于以下问题:PHP RGForms::get_page方法的具体用法?PHP RGForms::get_page怎么用?PHP RGForms::get_page使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类RGForms
的用法示例。
在下文中一共展示了RGForms::get_page方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: add_scripts_and_styles
function add_scripts_and_styles($hook)
{
if (!class_exists('RGForms')) {
do_action('gravityview_log_error', 'GravityView_Admin_ApproveEntries[add_scripts_and_styles] RGForms does not exist.');
return;
}
// enqueue styles & scripts gf_entries
// But only if we're on the main Entries page, not on reports pages
if (RGForms::get_page() === 'entry_list') {
$form_id = RGForms::get('id');
// If there are no forms identified, use the first form. That's how GF does it.
if (empty($form_id) && class_exists('RGFormsModel')) {
$forms = gravityview_get_forms();
if (!empty($forms)) {
$form_id = $forms[0]['id'];
}
}
$approvedcolumn = self::get_approved_column($form_id);
wp_register_style('gravityview_entries_list', plugins_url('assets/css/admin-entries-list.css', GRAVITYVIEW_FILE), array(), GravityView_Plugin::version);
wp_enqueue_style('gravityview_entries_list');
$script_debug = defined('SCRIPT_DEBUG') && SCRIPT_DEBUG ? '' : '.min';
wp_register_script('gravityview_gf_entries_scripts', plugins_url('assets/js/admin-entries-list' . $script_debug . '.js', GRAVITYVIEW_FILE), array('jquery'), GravityView_Plugin::version);
wp_enqueue_script('gravityview_gf_entries_scripts');
wp_localize_script('gravityview_gf_entries_scripts', 'gvGlobals', array('nonce' => wp_create_nonce('gravityview_ajaxgfentries'), 'form_id' => $form_id, 'show_column' => (int) $this->show_approve_entry_column($form_id), 'add_bulk_action' => (int) GVCommon::has_cap('gravityview_moderate_entries'), 'label_approve' => __('Approve', 'gravityview'), 'label_disapprove' => __('Disapprove', 'gravityview'), 'bulk_message' => $this->bulk_update_message, 'approve_title' => __('Entry not approved for directory viewing. Click to approve this entry.', 'gravityview'), 'unapprove_title' => __('Entry approved for directory viewing. Click to disapprove this entry.', 'gravityview'), 'column_title' => __('Show entry in directory view?', 'gravityview'), 'column_link' => esc_url(add_query_arg(array('sort' => $approvedcolumn)))));
}
}