当前位置: 首页>>代码示例>>PHP>>正文


PHP GFForms::is_gravity_page方法代码示例

本文整理汇总了PHP中GFForms::is_gravity_page方法的典型用法代码示例。如果您正苦于以下问题:PHP GFForms::is_gravity_page方法的具体用法?PHP GFForms::is_gravity_page怎么用?PHP GFForms::is_gravity_page使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在GFForms的用法示例。


在下文中一共展示了GFForms::is_gravity_page方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: add_hooks

 /**
  * @since 1.7.5
  */
 function add_hooks()
 {
     // If Gravity Forms isn't active or compatibile, stop loading
     if (false === GravityView_Compatibility::is_valid()) {
         return;
     }
     // Migrate Class
     require_once GRAVITYVIEW_DIR . 'includes/class-migrate.php';
     // Don't load tooltips if on Gravity Forms, otherwise it overrides translations
     if (!GFForms::is_gravity_page()) {
         require_once GFCommon::get_base_path() . '/tooltips.php';
     }
     require_once GRAVITYVIEW_DIR . 'includes/admin/metaboxes/class-gravityview-admin-metaboxes.php';
     require_once GRAVITYVIEW_DIR . 'includes/admin/entry-list.php';
     require_once GRAVITYVIEW_DIR . 'includes/class-change-entry-creator.php';
     /** @since 1.6 */
     require_once GRAVITYVIEW_DIR . 'includes/class-gravityview-admin-duplicate-view.php';
     // Filter Admin messages
     add_filter('post_updated_messages', array($this, 'post_updated_messages'));
     add_filter('bulk_post_updated_messages', array($this, 'post_updated_messages'));
     add_filter('plugin_action_links_' . plugin_basename(GRAVITYVIEW_FILE), array($this, 'plugin_action_links'));
     add_action('plugins_loaded', array($this, 'backend_actions'), 100);
     //Hooks for no-conflict functionality
     add_action('wp_print_scripts', array($this, 'no_conflict_scripts'), 1000);
     add_action('admin_print_footer_scripts', array($this, 'no_conflict_scripts'), 9);
     add_action('wp_print_styles', array($this, 'no_conflict_styles'), 1000);
     add_action('admin_print_styles', array($this, 'no_conflict_styles'), 11);
     add_action('admin_print_footer_scripts', array($this, 'no_conflict_styles'), 1);
     add_action('admin_footer', array($this, 'no_conflict_styles'), 1);
 }
开发者ID:psdes,项目名称:GravityView,代码行数:33,代码来源:class-admin.php

示例2: include_required_files

 /**
  * @since 1.15
  * @return void
  */
 private function include_required_files()
 {
     // Migrate Class
     require_once GRAVITYVIEW_DIR . 'includes/class-migrate.php';
     // Don't load tooltips if on Gravity Forms, otherwise it overrides translations
     if (class_exists('GFCommon') && class_exists('GFForms') && !GFForms::is_gravity_page()) {
         require_once GFCommon::get_base_path() . '/tooltips.php';
     }
     require_once GRAVITYVIEW_DIR . 'includes/admin/metaboxes/class-gravityview-admin-metaboxes.php';
     require_once GRAVITYVIEW_DIR . 'includes/admin/entry-list.php';
     require_once GRAVITYVIEW_DIR . 'includes/class-change-entry-creator.php';
     /** @since 1.15 **/
     require_once GRAVITYVIEW_DIR . 'includes/admin/class-gravityview-support-port.php';
     /** @since 1.6 */
     require_once GRAVITYVIEW_DIR . 'includes/class-gravityview-admin-duplicate-view.php';
 }
开发者ID:qqz,项目名称:GravityView,代码行数:20,代码来源:class-admin.php

示例3: init

 public function init()
 {
     if (!GFCommon::current_user_can_any($this->_capabilities)) {
         return;
     }
     // is any GF page
     if (GFForms::is_gravity_page()) {
         // add top toolbar menu item
         add_filter('gform_toolbar_menu', array($this, 'add_toolbar_menu_item'), 10, 2);
         // add custom form action
         add_filter('gform_form_actions', array($this, 'add_form_action'), 10, 2);
     }
     // is results page
     if (rgget('view') == "gf_results_{$this->_slug}") {
         // add the results view
         add_action('gform_entries_view', array($this, 'add_view'), 10, 2);
         add_action('admin_enqueue_scripts', array($this, 'enqueue_admin_scripts'));
         // tooltips
         require_once GFCommon::get_base_path() . '/tooltips.php';
         add_filter('gform_tooltips', array($this, 'add_tooltips'));
     }
 }
开发者ID:arobbins,项目名称:davis,代码行数:22,代码来源:class-gf-results.php

示例4: create_menu

 public static function create_menu()
 {
     $has_full_access = current_user_can('gform_full_access');
     $min_cap = GFCommon::current_user_can_which(GFCommon::all_caps());
     if (empty($min_cap)) {
         $min_cap = 'gform_full_access';
     }
     $addon_menus = array();
     $addon_menus = apply_filters('gform_addon_navigation', $addon_menus);
     $parent_menu = self::get_parent_menu($addon_menus);
     // Add a top-level left nav
     $update_icon = GFCommon::has_update() && current_user_can('install_plugins') ? "<span title='" . esc_attr(__('Update Available', 'gravityforms')) . "' class='update-plugins count-1'><span class='update-count'>1</span></span>" : '';
     $admin_icon = self::get_admin_icon_b64(GFForms::is_gravity_page() ? '#fff' : false);
     add_menu_page(__('Forms', 'gravityforms'), __('Forms', 'gravityforms') . $update_icon, $has_full_access ? 'gform_full_access' : $min_cap, $parent_menu['name'], $parent_menu['callback'], $admin_icon, apply_filters('gform_menu_position', '16.9'));
     // Adding submenu pages
     add_submenu_page($parent_menu['name'], __('Forms', 'gravityforms'), __('Forms', 'gravityforms'), $has_full_access ? 'gform_full_access' : 'gravityforms_edit_forms', 'gf_edit_forms', array('RGForms', 'forms'));
     add_submenu_page($parent_menu['name'], __('New Form', 'gravityforms'), __('New Form', 'gravityforms'), $has_full_access ? 'gform_full_access' : 'gravityforms_create_form', 'gf_new_form', array('RGForms', 'new_form'));
     add_submenu_page($parent_menu['name'], __('Entries', 'gravityforms'), __('Entries', 'gravityforms'), $has_full_access ? 'gform_full_access' : 'gravityforms_view_entries', 'gf_entries', array('RGForms', 'all_leads_page'));
     if (is_array($addon_menus)) {
         foreach ($addon_menus as $addon_menu) {
             add_submenu_page(esc_html($parent_menu['name']), esc_html($addon_menu['label']), esc_html($addon_menu['label']), $has_full_access ? 'gform_full_access' : $addon_menu['permission'], esc_html($addon_menu['name']), $addon_menu['callback']);
         }
     }
     add_submenu_page($parent_menu['name'], __('Settings', 'gravityforms'), __('Settings', 'gravityforms'), $has_full_access ? 'gform_full_access' : 'gravityforms_view_settings', 'gf_settings', array('RGForms', 'settings_page'));
     add_submenu_page($parent_menu['name'], __('Import/Export', 'gravityforms'), __('Import/Export', 'gravityforms'), $has_full_access ? 'gform_full_access' : 'gravityforms_export_entries', 'gf_export', array('RGForms', 'export_page'));
     if (current_user_can('install_plugins')) {
         add_submenu_page($parent_menu['name'], __('Updates', 'gravityforms'), __('Updates', 'gravityforms'), $has_full_access ? 'gform_full_access' : 'gravityforms_view_updates', 'gf_update', array('RGForms', 'update_page'));
         add_submenu_page($parent_menu['name'], __('Add-Ons', 'gravityforms'), __('Add-Ons', 'gravityforms'), $has_full_access ? 'gform_full_access' : 'gravityforms_view_addons', 'gf_addons', array('RGForms', 'addons_page'));
     }
     add_submenu_page($parent_menu['name'], __('Help', 'gravityforms'), __('Help', 'gravityforms'), $has_full_access ? 'gform_full_access' : $min_cap, 'gf_help', array('RGForms', 'help_page'));
 }
开发者ID:kidaak,项目名称:gravityforms,代码行数:31,代码来源:gravityforms.php


注:本文中的GFForms::is_gravity_page方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。