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


PHP add_submenu_page函数代码示例

本文整理汇总了PHP中add_submenu_page函数的典型用法代码示例。如果您正苦于以下问题:PHP add_submenu_page函数的具体用法?PHP add_submenu_page怎么用?PHP add_submenu_page使用的例子?那么, 这里精选的函数代码示例或许可以为您提供帮助。


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

示例1: create_admin_menu

 function create_admin_menu()
 {
     add_menu_page('Jobs Shop', 'Jobs Shop', 'manage_options', 'jobsshop', array($this, 'create_admin_page'), '', 33);
     add_submenu_page('jobsshop', 'Snap Categories', 'Categories', 'manage_options', 'edit-tags.php?taxonomy=snap_category');
     add_submenu_page('jobsshop', 'Configuration', 'Configuration', 'manage_options', 'configuration', array($this, 'create_configuration_page'));
     add_submenu_page('jobsshop', 'Payment Options', 'Payment Options', 'manage_options', 'payment-options', array($this, 'create_payment_option_page'));
 }
开发者ID:quangnpd,项目名称:jobshop_web,代码行数:7,代码来源:admin.php

示例2: attendees_page_register

 /**
  * Registers the Attendees admin page
  */
 public function attendees_page_register()
 {
     $this->attendees_page = add_submenu_page(null, 'Attendee list', 'Attendee list', 'edit_posts', self::$attendees_slug, array($this, 'attendees_page_inside'));
     add_action('admin_enqueue_scripts', array($this, 'attendees_page_load_css_js'));
     add_action('admin_enqueue_scripts', array($this, 'attendees_page_load_pointers'));
     add_action('load-' . $this->attendees_page, array($this, 'attendees_page_screen_setup'));
 }
开发者ID:NallelyFlores89,项目名称:cronica-ambiental,代码行数:10,代码来源:Tickets_Pro.php

示例3: add_page

 /**
  * Loads each admin page
  *
  * @return    void
  *
  * @access    public
  * @since     2.0
  */
 public function add_page()
 {
     /* loop through options */
     foreach ((array) $this->options as $option) {
         /* loop through pages */
         foreach ((array) $this->get_pages($option) as $page) {
             /* load page in WP top level menu */
             if (!isset($page['parent_slug']) || empty($page['parent_slug'])) {
                 $page_hook = add_menu_page($page['page_title'], $page['menu_title'], $page['capability'], $page['menu_slug'], array(&$this, 'display_page'), $page['icon_url'], $page['position']);
                 /* load page in WP sub menu */
             } else {
                 $page_hook = add_submenu_page($page['parent_slug'], $page['page_title'], $page['menu_title'], $page['capability'], $page['menu_slug'], array(&$this, 'display_page'));
             }
             /* only load if not a hidden page */
             if (!isset($page['hidden_page'])) {
                 /* associate $page_hook with page id */
                 $this->page_hook[$page['id']] = $page_hook;
                 /* add scripts */
                 add_action('admin_print_scripts-' . $page_hook, array(&$this, 'scripts'));
                 /* add styles */
                 add_action('admin_print_styles-' . $page_hook, array(&$this, 'styles'));
                 /* add contextual help */
                 add_action('load-' . $page_hook, array(&$this, 'help'));
             }
         }
     }
     return false;
 }
开发者ID:aguerojahannes,项目名称:aguerojahannes.com,代码行数:36,代码来源:ot-settings-api.php

示例4: gocardless_admin_menu_option

function gocardless_admin_menu_option()
{
    if (function_exists('add_menu_page') && function_exists('add_submenu_page')) {
        add_menu_page('GoCardless', 'GoCardless', 'manage_options', 'gocardless_admin', 'gocardless_admin');
        add_submenu_page('gocardless_admin', 'GoCardless Setup', 'Setup', 'manage_options', 'gocardless_admin_setup', 'gocardless_admin_setup');
    }
}
开发者ID:Geekathon,项目名称:wp-gocardless,代码行数:7,代码来源:gocardless.php

示例5: init_admin_menu

 /**
  * Initialise admin menu items
  */
 public static function init_admin_menu()
 {
     add_submenu_page('livefyre_apps', 'General', 'General', "manage_options", 'livefyre_apps', array('Livefyre_Apps_Admin', 'menu_general'));
     add_menu_page('Livefyre Apps', 'Livefyre Apps', 'manage_options', 'livefyre_apps', array('Livefyre_Apps_Admin', 'menu_general'), LFAPPS__PLUGIN_URL . "assets/img/livefyre-icon_x16.png");
     //community authentication page (invisible and only handles data sent back from livefyre.com)
     add_submenu_page(null, 'Livefyre', 'Livefyre', "manage_options", 'livefyre', array('Livefyre_Apps_Admin', 'menu_general'));
 }
开发者ID:gopinathshiva,项目名称:wordpress-vip-plugins,代码行数:10,代码来源:Livefyre_Apps_Admin.php

示例6: admin_menu

 function admin_menu()
 {
     // validate
     if (!$this->parent->is_field_unlocked('options_page')) {
         return true;
     }
     $parent_slug = 'acf-options';
     $parent_title = __('Options', 'acf');
     // set parent slug
     $custom = apply_filters('acf_register_options_page', array());
     if (!empty($custom)) {
         $parent_slug = $custom[0]['slug'];
         $parent_title = $custom[0]['title'];
     }
     // Parent
     $parent_page = add_menu_page($parent_title, __('Options', 'acf'), 'edit_posts', $parent_slug, array($this, 'html'));
     // some fields require js + css
     add_action('admin_print_scripts-' . $parent_page, array($this, 'admin_print_scripts'));
     add_action('admin_print_styles-' . $parent_page, array($this, 'admin_print_styles'));
     // Add admin head
     add_action('admin_head-' . $parent_page, array($this, 'admin_head'));
     add_action('admin_footer-' . $parent_page, array($this, 'admin_footer'));
     if (!empty($custom)) {
         foreach ($custom as $c) {
             $child_page = add_submenu_page($parent_slug, $c['title'], $c['title'], 'edit_posts', $c['slug'], array($this, 'html'));
             // some fields require js + css
             add_action('admin_print_scripts-' . $child_page, array($this, 'admin_print_scripts'));
             add_action('admin_print_styles-' . $child_page, array($this, 'admin_print_styles'));
             // Add admin head
             add_action('admin_head-' . $child_page, array($this, 'admin_head'));
             add_action('admin_footer-' . $child_page, array($this, 'admin_footer'));
         }
     }
 }
开发者ID:esecamalich,项目名称:Lettres-Studio,代码行数:34,代码来源:options_page.php

示例7: ewww_ngg_bulk_menu

 function ewww_ngg_bulk_menu()
 {
     if (!defined('NGGFOLDER')) {
         return;
     }
     add_submenu_page(NGGFOLDER, esc_html__('Bulk Optimize', EWWW_IMAGE_OPTIMIZER_DOMAIN), esc_html__('Bulk Optimize', EWWW_IMAGE_OPTIMIZER_DOMAIN), apply_filters('ewww_image_optimizer_manual_permissions', ''), 'ewww-ngg-bulk', array(&$this, 'ewww_ngg_bulk_preview'));
 }
开发者ID:vanburenyouthcamp,项目名称:vbyc.org,代码行数:7,代码来源:nextgen2-integration.php

示例8: add_admin_page

 /**
  * Adds the roles page to the admin.
  *
  * @since  1.0.0
  * @access public
  * @return void
  */
 public function add_admin_page()
 {
     // The "Roles" page should be shown for anyone that has the 'list_roles', 'edit_roles', or
     // 'delete_roles' caps, so we're checking against all three.
     $edit_roles_cap = 'list_roles';
     // If the current user can 'edit_roles'.
     if (current_user_can('edit_roles')) {
         $edit_roles_cap = 'edit_roles';
     } elseif (current_user_can('delete_roles')) {
         $edit_roles_cap = 'delete_roles';
     }
     // Get the page title.
     $title = esc_html__('Roles', 'members');
     if (isset($_GET['action']) && 'edit' === $_GET['action'] && isset($_GET['role'])) {
         $title = esc_html__('Edit Role', 'members');
     }
     // Create the Manage Roles page.
     $this->page = add_submenu_page('users.php', $title, esc_html__('Roles', 'members'), $edit_roles_cap, 'roles', array($this, 'page'));
     // Let's roll if we have a page.
     if ($this->page) {
         // If viewing the edit role page.
         if (isset($_REQUEST['action']) && 'edit' === $_REQUEST['action'] && current_user_can('edit_roles')) {
             $this->page_obj = new Members_Admin_Role_Edit();
         } else {
             $this->page_obj = new Members_Admin_Roles();
         }
         // Load actions.
         add_action("load-{$this->page}", array($this, 'load'));
         // Load scripts/styles.
         add_action('admin_enqueue_scripts', array($this, 'enqueue'));
     }
 }
开发者ID:vunh1989,项目名称:vodphoto,代码行数:39,代码来源:class-manage-roles.php

示例9: add_settings_page

 /**
  * Add options page   
  */
 public function add_settings_page()
 {
     global $WCMp;
     add_submenu_page('woocommerce', __('WCMp', $WCMp->text_domain), __('WCMp', $WCMp->text_domain), 'manage_woocommerce', 'wcmp-setting-admin', array($this, 'create_wcmp_settings'), $WCMp->plugin_url . 'assets/images/dualcube.png');
     $this->tabs = $this->get_wcmp_settings_tabs();
     $this->tabsection_general = $this->get_wcmp_settings_tabsections_general();
 }
开发者ID:qhuit,项目名称:UrbanPekor,代码行数:10,代码来源:class-wcmp-settings.php

示例10: admin_menu_upload_site_icon

 /**
  * Add a hidden upload page.
  *
  * There is no need to access it directly.
  *
  * @since 4.3.0
  */
 public function admin_menu_upload_site_icon()
 {
     $hook = add_submenu_page(null, __('Site Icon'), __('Site Icon'), 'manage_options', 'site-icon', array($this, 'upload_site_icon_page'));
     add_action("load-{$hook}", array($this, 'add_upload_settings'));
     add_action("load-{$hook}", array($this, 'maybe_skip_cropping'));
     add_action("admin_print_scripts-{$hook}", array($this, 'enqueue_scripts'));
 }
开发者ID:naturalogy,项目名称:WordPress,代码行数:14,代码来源:class-wp-site-icon.php

示例11: wpmanga_adminmenu

/**
 * Generate WP Admin Menu
 * @return menu
 */
function wpmanga_adminmenu()
{
    if (current_user_can('edit_posts') || current_user_can('edit_pages')) {
        // Projects
        add_menu_page('Projects', 'Projects', 'edit_posts', 'manga', 'wpmanga_listProjects');
        add_submenu_page('manga', 'Add/Edit/Delete Project', '-- Add/Edit/Delete', 'edit_posts', 'manga/project', 'wpmanga_dataProject');
        // Volume Covers
        add_submenu_page('manga', 'Volume Covers', 'Volume Covers', 'edit_posts', 'manga/list/volume', 'wpmanga_listCovers');
        add_submenu_page('manga', 'Add/Edit/Delete Volume Cover', '-- Add/Edit/Delete', 'edit_posts', 'manga/volume', 'wpmanga_dataCover');
        // Releases
        add_submenu_page('manga', 'Releases', 'Releases', 'edit_posts', 'manga/list/release', 'wpmanga_listReleases');
        add_submenu_page('manga', 'Add/Edit/Delete Release', '-- Add/Edit/Delete', 'edit_posts', 'manga/release', 'wpmanga_dataRelease');
        // Miscellaneous Pages
        if (is_admin()) {
            add_submenu_page('manga', 'WP Manga Settings', 'Settings', 'manage_options', 'manga/settings', 'wpmanga_settings');
        }
        add_submenu_page('manga', 'About', 'About', 'edit_posts', 'manga/about', 'wpmanga_about');
        // Load Required JavaScript and StyleSheet
        if (preg_match("/(manga\\/project|manga\\/volume)/i", $_GET['page'])) {
            wp_enqueue_style('thickbox');
            wp_enqueue_script('jquery');
            wp_enqueue_script('media-upload');
            wp_enqueue_script('pimage-upload', plugin_sURL() . 'admin/assets/media-uploader.js', array('jquery', 'media-upload', 'thickbox'));
        }
        if (preg_match("/(manga\\/release)/i", $_GET['page'])) {
            wp_enqueue_script('jquery');
            wp_enqueue_script('jquery-ui', plugin_sURL() . 'admin/assets/jquery-ui.custom.js', array('jquery'));
            wp_enqueue_script('datetime', plugin_sURL() . 'admin/assets/jquery-ui.datetime.js', array('jquery'));
            wp_enqueue_style('datetime', plugin_sURL() . 'admin/assets/jquery-ui.datetime.css');
            wp_enqueue_style('jquery-ui', plugin_sURL() . 'admin/assets/jquery-ui.custom.css');
        }
    }
}
开发者ID:Albirew,项目名称:wp-manga-project-manager,代码行数:37,代码来源:admin_menu.php

示例12: register_settings_page

 /**
  * Add MultilingualPress network settings and module page.
  *
  * @return void
  */
 public function register_settings_page()
 {
     $view = new Mlp_General_Settings_View($this->model);
     // Register options page
     $this->page_hook = add_submenu_page('settings.php', __('MultilingualPress', 'multilingual-press'), __('MultilingualPress', 'multilingual-press'), 'manage_network_options', 'mlp', array($view, 'render_page'));
     $this->assets->provide(array('mlp_admin_js', 'mlp_admin_css'));
 }
开发者ID:luisarn,项目名称:multilingual-press,代码行数:12,代码来源:Mlp_General_Settingspage.php

示例13: register_my_custom_menu_page

 public function register_my_custom_menu_page()
 {
     add_menu_page(
         'RJ Quickcharts',
         'RJ Quickcharts',
         'read',
         'rj-quickcharts/admin/rjqc-admin.php',
         '',
         '',
         '26.1'
     );
     add_submenu_page(
         'rj-quickcharts/admin/rjqc-admin.php',
         'My Charts',
         'My Charts',
         'read',
         'rj-quickcharts/admin/rjqc-admin.php'
     );
     add_submenu_page(
         'rj-quickcharts/admin/rjqc-admin.php',
         'New Chart',
         'New Chart',
         'read',
         'rj-quickcharts/admin/rjqc-admin-new.php'
     );
 }
开发者ID:polaris610,项目名称:medicalhound,代码行数:26,代码来源:init.php

示例14: register_brainstorm_menu

 function register_brainstorm_menu()
 {
     if (!current_user_can('manage_options')) {
         return false;
     }
     global $submenu;
     if (defined('BSF_MENU_POS')) {
         $required_place = BSF_MENU_POS;
     } else {
         $required_place = 200;
     }
     $place = bsf_get_free_menu_position($required_place, 1);
     $page = add_menu_page('Ultimate', 'Ultimate', 'administrator', 'ultimate-dashboard', array($this, 'load_modules'), '', $place);
     //	Add sub-menu for OPN if OPN in installed - {One Page Navigator}.
     if (defined('OPN_VERSION')) {
         if (defined('BSF_MENU_POS')) {
             $required_place = BSF_MENU_POS;
         } else {
             $required_place = 200;
         }
         $place = bsf_get_free_menu_position($required_place, 1);
         $page = add_menu_page('OPN', 'OPN', 'administrator', 'opn-settings', array($this, 'load_opn'), 'dashicons-admin-generic', $place);
     }
     $icon_manager_page = add_submenu_page("ultimate-dashboard", __("Icon Manager", "ultimate_vc"), __("Icon Manager", "ultimate_vc"), "administrator", "font-icon-Manager", array($this, 'ultimate_icon_manager_menu'));
     $AIO_Icon_Manager = new AIO_Icon_Manager();
     add_action('admin_print_scripts-' . $icon_manager_page, array($AIO_Icon_Manager, 'admin_scripts'));
     $Ultimate_Google_Font_Manager = new Ultimate_Google_Font_Manager();
     $google_font_manager_page = add_submenu_page("ultimate-dashboard", __("Google Font Manager", "ultimate_vc"), __("Google Fonts", "ultimate_vc"), "administrator", "ultimate-font-manager", array($Ultimate_Google_Font_Manager, 'ultimate_font_manager_dashboard'));
     add_action('admin_print_scripts-' . $google_font_manager_page, array($Ultimate_Google_Font_Manager, 'admin_google_font_scripts'));
     // must be at end of all sub menu
     add_submenu_page("ultimate-dashboard", __("About Ultimate", "ultimate_vc"), __("About Ultimate", "ultimate_vc"), "administrator", "about-ultimate", array($this, 'load_about'));
     $submenu['ultimate-dashboard'][0][0] = __("Modules", "ultimate_vc");
 }
开发者ID:VitaAprel,项目名称:mynotebook,代码行数:33,代码来源:admin.php

示例15: bwg_options_panel

function bwg_options_panel()
{
    $galleries_page = add_menu_page('Photo Gallery', 'Photo Gallery', 'manage_options', 'galleries_bwg', 'bwg_gallery', WD_BWG_URL . '/images/icons/best-wordpress-gallery.png');
    $galleries_page = add_submenu_page('galleries_bwg', __('Add Galleries/Images', 'bwg_back'), __('Add Galleries/Images', 'bwg_back'), 'manage_options', 'galleries_bwg', 'bwg_gallery');
    add_action('admin_print_styles-' . $galleries_page, 'bwg_styles');
    add_action('admin_print_scripts-' . $galleries_page, 'bwg_scripts');
    add_action('load-' . $galleries_page, 'bwg_add_galleries_per_page_option');
    $albums_page = add_submenu_page('galleries_bwg', __('Albums', 'bwg_back'), __('Albums', 'bwg_back'), 'manage_options', 'albums_bwg', 'bwg_gallery');
    add_action('admin_print_styles-' . $albums_page, 'bwg_styles');
    add_action('admin_print_scripts-' . $albums_page, 'bwg_scripts');
    add_action('load-' . $albums_page, 'bwg_add_albums_per_page_option');
    $tags_page = add_submenu_page('galleries_bwg', __('Tags', 'bwg_back'), __('Tags', 'bwg_back'), 'manage_options', 'tags_bwg', 'bwg_gallery');
    add_action('admin_print_styles-' . $tags_page, 'bwg_styles');
    add_action('admin_print_scripts-' . $tags_page, 'bwg_scripts');
    add_action('load-' . $tags_page, 'bwg_add_tags_per_page_option');
    $options_page = add_submenu_page('galleries_bwg', __('Options', 'bwg_back'), __('Options', 'bwg_back'), 'manage_options', 'options_bwg', 'bwg_gallery');
    add_action('admin_print_styles-' . $options_page, 'bwg_styles');
    add_action('admin_print_scripts-' . $options_page, 'bwg_options_scripts');
    $themes_page = add_submenu_page('galleries_bwg', __('Themes', 'bwg_back'), __('Themes', 'bwg_back'), 'manage_options', 'themes_bwg', 'bwg_gallery');
    add_action('admin_print_styles-' . $themes_page, 'bwg_styles');
    add_action('admin_print_scripts-' . $themes_page, 'bwg_options_scripts');
    add_action('load-' . $themes_page, 'bwg_add_themes_per_page_option');
    add_submenu_page('galleries_bwg', __('Generate Shortcode', 'bwg_back'), __('Generate Shortcode', 'bwg_back'), 'manage_options', 'BWGShortcode', 'bwg_gallery');
    $licensing_plugins_page = add_submenu_page('galleries_bwg', __('Get Pro', 'bwg_back'), __('Get Pro', 'bwg_back'), 'manage_options', 'licensing_bwg', 'bwg_gallery');
    add_action('admin_print_styles-' . $licensing_plugins_page, 'bwg_licensing_styles');
    add_submenu_page('galleries_bwg', __('Featured Plugins', 'bwg_back'), __('Featured Plugins', 'bwg_back'), 'manage_options', 'featured_plugins_bwg', 'bwg_featured');
    add_submenu_page('galleries_bwg', __('Featured Themes', 'bwg_back'), __('Featured Themes', 'bwg_back'), 'manage_options', 'featured_themes_bwg', 'bwg_featured_themes');
    $uninstall_page = add_submenu_page('galleries_bwg', __('Uninstall', 'bwg_back'), __('Uninstall', 'bwg_back'), 'manage_options', 'uninstall_bwg', 'bwg_gallery');
    add_action('admin_print_styles-' . $uninstall_page, 'bwg_styles');
    add_action('admin_print_scripts-' . $uninstall_page, 'bwg_options_scripts');
    add_menu_page('Photo Gallery Add-ons', 'Photo Gallery Add-ons', 'manage_options', 'addons_bwg', 'bwg_addons', WD_BWG_URL . '/addons/images/add-ons-icon.png');
}
开发者ID:benshez,项目名称:DreamWeddingCeremonies,代码行数:32,代码来源:photo-gallery.php


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