本文整理汇总了PHP中add_menu_page函数的典型用法代码示例。如果您正苦于以下问题:PHP add_menu_page函数的具体用法?PHP add_menu_page怎么用?PHP add_menu_page使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了add_menu_page函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: add_toplevel_menu
/**
* Adds the plugin toplevel menu
*
* @return void
*/
public function add_toplevel_menu()
{
global $menu;
// Default menu positioning
$position = '100.1';
// If enabled, relocate the plugin menus higher
if (apply_filters('easingslider_relocate_menus', __return_true())) {
for ($position = '40.1'; $position <= '100.1'; $position += '0.1') {
// Ensure there is a space before and after each position we are checking, leaving room for our separators.
$before = $position - '0.1';
$after = $position + '0.1';
// Do the checks for each position. These need to be strings, hence the quotation marks.
if (isset($menu["{$position}"])) {
continue;
}
if (isset($menu["{$before}"])) {
continue;
}
if (isset($menu["{$after}"])) {
continue;
}
// If we've successfully gotten this far, break the loop. We've found the position we need.
break;
}
}
// Add toplevel menu
add_menu_page(__('Sliders', 'easingslider'), __('Sliders', 'easingslider'), 'easingslider_edit_sliders', 'easingslider_edit_sliders', null, 'dashicons-images-alt', "{$position}");
// Do action allowing extension to add their own toplevel menus
do_action('easingslider_add_toplevel_menu', $position);
// Add the menu separators if menus have been relocated (they are by default). Quotations marks ensure these are strings.
if (apply_filters('easingslider_relocate_menus', __return_true())) {
$this->add_menu_separator("{$before}");
$this->add_menu_separator("{$after}");
}
}
示例2: add_plugin_admin_menu
/**
* Register the administration menu for this plugin into the WordPress Dashboard menu.
*
*/
public function add_plugin_admin_menu()
{
$this->plugin_screen_hook_suffix = add_menu_page('Wemahu Dashboard', 'Wemahu', 'manage_options', $this->plugin_slug, array($this, 'display_wemahu_dashboard'));
$this->plugin_screen_hook_suffix = add_submenu_page($this->plugin_slug, 'Wemahu Rulesets', 'Rulesets', 'manage_options', 'wemahu_rulesets', array($this, 'display_wemahu_rulesets'));
$this->plugin_screen_hook_suffix = add_submenu_page($this->plugin_slug, 'Wemahu Settings', 'Settings', 'manage_options', 'wemahu_settings', array($this, 'display_wemahu_settings'));
$this->plugin_screen_hook_suffix = add_submenu_page($this->plugin_slug, 'Wemahu Help', 'Help/About', 'manage_options', 'wemahu_help', array($this, 'display_wemahu_help'));
}
示例3: form_add_admin
function form_add_admin()
{
global $form_name, $form_shortname, $form;
$form_options = form_options();
if (isset($_GET['page']) && $_GET['page'] == "form") {
if (isset($_REQUEST['action']) && 'install' == $_REQUEST['action']) {
delete_option('form_log');
foreach ($form_options as $value) {
if (isset($_REQUEST[$value['id']])) {
update_option($value['id'], $_REQUEST[$value['id']]);
} else {
delete_option($value['id']);
}
}
header("Location: admin.php?page=form&installed=true");
die;
}
}
add_menu_page($form_name, $form_name, 'manage_options', 'form', 'form_main');
add_submenu_page('form', $form_name . ' - Setup', 'Setup', 'manage_options', 'form', 'form_main');
if (get_option("form_version")) {
if (!isset($form['output']['menus']) && !isset($_SESSION['form']['menus'])) {
form_output('headers');
}
//load menus
if (isset($form['output']['menus']) && is_array($form['output']['menus']) && count($form['output']['menus']) > 0) {
$_SESSION['form']['menus'] = $form['output']['menus'];
}
if (isset($_SESSION['form']['menus'])) {
foreach ($_SESSION['form']['menus'] as $menu) {
add_submenu_page('form', $form_name . ' - ' . $menu[0], $menu[0], 'manage_options', $menu[1], 'form_main');
}
}
}
}
示例4: cx_admin_menu
/**
* Setup the Admin menu in WordPress
*
* @return void
*/
function cx_admin_menu()
{
global $wp_version, $CX;
// Add old style custom icon for before WP 3.8
$old_ico = version_compare($wp_version, '3.8', '<') ? CX_URL . '/assets/img/cx-ico-16.png' : '';
/**
* Menu for Admins
*/
if (current_user_can('manage_options')) {
add_menu_page($CX->meta['Name'], 'Chat X', 'manage_options', 'chat_x', 'cx_console_template', $old_ico, '50.9874');
/**
* Menu for Operators
*/
} else {
if (current_user_can('answer_visitors')) {
add_menu_page($CX->meta['Name'], 'Chat X', 'cx_op', 'chat_x', 'cx_console_template', $old_ico, '50.9874');
}
}
/**
* Add submenus
*/
// Chat Logs
add_submenu_page('chat_x', __('Chat Logs', 'cx'), __('Chat Logs', 'cx'), 'manage_options', 'cx_chat_logs', 'cx_render_chat_logs');
// Offline Messages
add_submenu_page('chat_x', __('Offline messages', 'cx'), __('Offline messages', 'cx'), 'manage_options', 'edit.php?post_type=cx_offline_msg');
/*add_submenu_page(
'chat_x',
__( 'Predefined messages', 'cx' ),
__( 'Predefined messages', 'cx' ),
'manage_options',
'edit.php?post_type=cx_predefined_msg'
);*/
// Remove publish box some post types
remove_meta_box('submitdiv', 'cx_offline_msg', 'side');
}
示例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'));
}
示例6: bp_activity_add_admin_menu
/**
* Register the Activity component admin screen.
*
* @since BuddyPress (1.6)
*/
function bp_activity_add_admin_menu()
{
// Add our screen
$hook = add_menu_page(_x('Activity', 'Admin Dashbord SWA page title', 'buddypress'), _x('Activity', 'Admin Dashbord SWA menu', 'buddypress'), 'bp_moderate', 'bp-activity', 'bp_activity_admin', 'div');
// Hook into early actions to load custom CSS and our init handler.
add_action("load-{$hook}", 'bp_activity_admin_load');
}
示例7: PricerrTheme_admin_menu
function PricerrTheme_admin_menu()
{
$icn = get_bloginfo('template_url') . "/images/pricerr.gif";
$capability = 10;
add_menu_page(__('Pricerr Theme'), __('Pricerr Theme', 'PricerrTheme'), $capability, "PT1_admin_mnu", 'PricerrTheme_summary_scr', $icn, 0);
add_submenu_page("PT1_admin_mnu", __('Site Summary', 'PricerrTheme'), pricerrtheme_disp_spcl_cst_pic('overview_icon.png') . __('Site Summary', 'PricerrTheme'), $capability, "PT1_admin_mnu", 'PricerrTheme_summary_scr');
add_submenu_page("PT1_admin_mnu", __('General Options', 'PricerrTheme'), pricerrtheme_disp_spcl_cst_pic('setup_icon.png') . __('General Options', 'PricerrTheme'), $capability, "general-options", 'PricerrTheme_general_options');
add_submenu_page("PT1_admin_mnu", __('Layout Settings', 'PricerrTheme'), pricerrtheme_disp_spcl_cst_pic('layout_icon.png') . __('Layout Settings', 'PricerrTheme'), $capability, "layout-settings", 'PricerrTheme_layout_settings');
add_submenu_page('PT1_admin_mnu', __('Category Images', 'PricerrTheme'), pricerrtheme_disp_spcl_cst_pic('image_icon.png') . __('Category Images', 'PricerrTheme'), '10', 'cat_images', 'PricerrTheme_category_images');
add_submenu_page("PT1_admin_mnu", __('Email Settings', 'PricerrTheme'), pricerrtheme_disp_spcl_cst_pic('email_icon.png') . __('Email Settings', 'PricerrTheme'), $capability, 'email-settings', 'PricerrTheme_email_settings');
add_submenu_page("PT1_admin_mnu", __('Pricing Settings', 'PricerrTheme'), pricerrtheme_disp_spcl_cst_pic('dollar_icon.png') . __('Pricing Settings', 'PricerrTheme'), $capability, 'pricing-settings', 'PricerrTheme_pricing_options');
add_submenu_page("PT1_admin_mnu", __('Payment Gateways', 'PricerrTheme'), pricerrtheme_disp_spcl_cst_pic('gateway_icon.png') . __('Payment Gateways', 'PricerrTheme'), $capability, 'payment-methods', 'PricerrTheme_payment_methods');
add_submenu_page('PT1_admin_mnu', __('Withdraw Requests', 'PricerrTheme'), pricerrtheme_disp_spcl_cst_pic('wallet_icon.png') . __('Withdraw Requests', 'PricerrTheme'), $capability, 'withdraw-req', 'PricerrTheme_withdrawals');
add_submenu_page('PT1_admin_mnu', __('User Balances', 'PricerrTheme'), pricerrtheme_disp_spcl_cst_pic('bal_icon.png') . __('User Balances', 'PricerrTheme'), '10', 'User-Balances', 'PricerrTheme_user_balances');
add_submenu_page('PT1_admin_mnu', __('User Badges', 'PricerrTheme'), pricerrtheme_disp_spcl_cst_pic('badge1.png') . __('User Badges', 'PricerrTheme'), '10', 'user_badges', 'PricerrTheme_user_badges');
add_submenu_page('PT1_admin_mnu', __('User Levels', 'PricerrTheme'), pricerrtheme_disp_spcl_cst_pic('bdg1.png') . __('User Levels', 'PricerrTheme'), '10', 'user_levels', 'PricerrTheme_user_levels');
add_submenu_page("PT1_admin_mnu", __('InSite Transactions', 'PricerrTheme'), pricerrtheme_disp_spcl_cst_pic('list_icon.png') . __('InSite Transactions', 'PricerrTheme'), $capability, 'trans-site', 'PricerrTheme_hist_trans');
add_submenu_page('PT1_admin_mnu', __('Orders', 'PricerrTheme'), pricerrtheme_disp_spcl_cst_pic('orders_icon.png') . __('Orders', 'PricerrTheme'), $capability, 'order-stats', 'PricerrTheme_orders_m');
add_submenu_page('PT1_admin_mnu', __('User Reviews', 'PricerrTheme'), pricerrtheme_disp_spcl_cst_pic('review_icon.png') . __('User Reviews', 'PricerrTheme'), $capability, 'usrrev', 'PricerrTheme_user_reviews_scr');
add_submenu_page('PT1_admin_mnu', __('Private Messages', 'PricerrTheme'), pricerrtheme_disp_spcl_cst_pic('mess_icon.png') . __('Private Messages', 'PricerrTheme'), $capability, 'privmess', 'PricerrTheme_private_messages_scr');
add_submenu_page('PT1_admin_mnu', __('Chat Messages', 'PricerrTheme'), pricerrtheme_disp_spcl_cst_pic('mess_icon.png') . __('Chat Messages', 'PricerrTheme'), $capability, 'chatmess', 'PricerrTheme_chat_messages_scr');
add_submenu_page("PT1_admin_mnu", __('Tracking Tools', 'PricerrTheme'), pricerrtheme_disp_spcl_cst_pic('track_icon.png') . __('Tracking Tools', 'PricerrTheme'), $capability, 'track-tools', 'PricerrTheme_tracking_tools');
add_submenu_page("PT1_admin_mnu", __('Advertising', 'PricerrTheme'), pricerrtheme_disp_spcl_cst_pic('adv_icon.png') . __('Advertising', 'PricerrTheme'), $capability, 'adv-tools', 'PricerrTheme_advertising_scr');
add_submenu_page("PT1_admin_mnu", __('Info Stuff', 'PricerrTheme'), pricerrtheme_disp_spcl_cst_pic('info_icon.png') . __('Info Stuff', 'PricerrTheme'), $capability, 'info-stuff', 'PricerrTheme_information');
do_action('PricerrTheme_new_admin_options_menu');
}
示例8: 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'));
}
示例9: 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");
}
示例10: test_menu_page_url
function test_menu_page_url() {
$current_user = get_current_user_id();
wp_set_current_user( $this->factory->user->create( array( 'role' => 'administrator' ) ) );
update_option( 'siteurl', 'http://example.com' );
// add some pages
add_options_page( 'Test Settings', 'Test Settings', 'manage_options', 'testsettings', 'mt_settings_page' );
add_management_page( 'Test Tools', 'Test Tools', 'manage_options', 'testtools', 'mt_tools_page' );
add_menu_page( 'Test Toplevel', 'Test Toplevel', 'manage_options', 'mt-top-level-handle', 'mt_toplevel_page' );
add_submenu_page( 'mt-top-level-handle', 'Test Sublevel', 'Test Sublevel', 'manage_options', 'sub-page', 'mt_sublevel_page' );
add_submenu_page( 'mt-top-level-handle', 'Test Sublevel 2', 'Test Sublevel 2', 'manage_options', 'sub-page2', 'mt_sublevel_page2' );
add_theme_page( 'With Spaces', 'With Spaces', 'manage_options', 'With Spaces', 'mt_tools_page' );
add_pages_page( 'Appending Query Arg', 'Test Pages', 'edit_pages', 'testpages', 'mt_pages_page' );
$expected['testsettings'] = 'http://example.com/wp-admin/options-general.php?page=testsettings';
$expected['testtools'] = 'http://example.com/wp-admin/tools.php?page=testtools';
$expected['mt-top-level-handle'] = 'http://example.com/wp-admin/admin.php?page=mt-top-level-handle';
$expected['sub-page'] = 'http://example.com/wp-admin/admin.php?page=sub-page';
$expected['sub-page2'] = 'http://example.com/wp-admin/admin.php?page=sub-page2';
$expected['not_registered'] = '';
$expected['With Spaces'] = 'http://example.com/wp-admin/themes.php?page=WithSpaces';
$expected['testpages'] = 'http://example.com/wp-admin/edit.php?post_type=page&page=testpages';
foreach ($expected as $name => $value) {
$this->assertEquals( $value, menu_page_url( $name, false ) );
}
wp_set_current_user( $current_user );
}
示例11: inscricoes_estatisticas_menu
function inscricoes_estatisticas_menu()
{
$topLevelMenuLabel = 'Relatórios';
/* Top level menu */
add_menu_page($topLevelMenuLabel, $topLevelMenuLabel, 'edit_published_posts', 'inscricoes_estatisticas', 'relatorios_sumario_page_callback_function');
/* inscritos */
add_submenu_page('inscricoes_estatisticas', 'Inscrições por Estado', 'Inscrições por Estado', 'edit_published_posts', 'inscritos_estado', 'inscritos_estado_page_callback_function');
add_submenu_page('inscricoes_estatisticas', 'Inscrições por Estado - listagem', 'Inscrições por Estado - listagem', 'edit_published_posts', 'inscritos_estado_total', 'inscritos_estado_total_page_callback_function');
add_submenu_page('inscricoes_estatisticas', 'Inscrições por Setorial - listagem', 'Inscrições por Setorial - listagem', 'edit_published_posts', 'inscritos_setorial_total', 'inscritos_setorial_total_page_callback_function');
add_submenu_page('inscricoes_estatisticas', 'Inscrições por Setorial/Estado', 'Inscrições por Setorial/Estado', 'edit_published_posts', 'inscritos_setorial_estado', 'inscritos_setorial_estado_page_callback_function');
add_submenu_page('inscricoes_estatisticas', 'Inscritos que votaram/não votaram', 'Inscritos que votaram/não votaram', 'edit_published_posts', 'votos_inscritos_votaram', 'votos_inscritos_votaram_page_callback_function');
/* candidatos */
add_submenu_page('inscricoes_estatisticas', 'Candidatos inscritos por setorial', 'Candidatos inscritos por setorial', 'edit_published_posts', 'candidatos_setorial', 'candidatos_setorial_page_callback_function');
add_submenu_page('inscricoes_estatisticas', 'Candidatos inscritos - total por estado', 'Candidatos inscritos - total por estado', 'edit_published_posts', 'candidatos_estado_total', 'candidatos_estado_total_page_callback_function');
add_submenu_page('inscricoes_estatisticas', 'Candidatos inscritos por setorial/estado', 'Candidatos inscritos por setorial/estado', 'edit_published_posts', 'candidatos_setorial_estado', 'candidatos_setorial_estado_page_callback_function');
add_submenu_page('inscricoes_estatisticas', 'Candidatos por gênero por setorial/estado', 'Candidatos por gênero por setorial/estado', 'edit_published_posts', 'candidatos_genero', 'candidatos_genero_page_callback_function');
add_submenu_page('inscricoes_estatisticas', 'Candidatos por gênero por estado - listagem', 'Candidatos por gênero por estado - listagem', 'edit_published_posts', 'candidatos_genero_estado_total', 'candidatos_genero_estado_total_page_callback_function');
add_submenu_page('inscricoes_estatisticas', 'Candidatos afrodescendentes por setorial/estado', 'Candidatos afrodescendentes', 'edit_published_posts', 'candidatos_afrodesc', 'candidatos_afrodesc_page_callback_function');
add_submenu_page('inscricoes_estatisticas', 'Candidatos afrodescendentes por setorial/estado', 'Candidatos afrodescendentes por estado', 'edit_published_posts', 'candidatos_afrodesc_estado_total', 'candidatos_afrodesc_estado_total_page_callback_function');
/* votos
add_submenu_page('inscricoes_estatisticas', 'Total geral de votos', 'Total geral de votos', 'manage_options', 'votos_total', 'votos_total_page_callback_function');
add_submenu_page('inscricoes_estatisticas', 'Total de votos por estado - listagem', 'Total de votos por estado - listagem', 'manage_options', 'votos_estado_total', 'votos_estado_total_page_callback_function');
add_submenu_page('inscricoes_estatisticas', 'Total de votos por setorial', 'Votos por setorial', 'manage_options', 'votos_setorial', 'votos_setorial_page_callback_function');
add_submenu_page('inscricoes_estatisticas', 'Total de votos por gênero por estado - listagem', 'Votos por gênero - listagem', 'manage_options', 'votos_genero_estado_total', 'votos_genero_estado_total_page_callback_function');
add_submenu_page('inscricoes_estatisticas', 'Total de votos por afrodescendência', 'Votos por afrodescendência', 'manage_options', 'votos_afrodesc_total', 'votos_afrodesc_total_page_callback_function');
add_submenu_page('inscricoes_estatisticas', 'Votos por setorial/estado', 'Votos por setorial/estado', 'manage_options', 'votos_setorial_estado', 'votos_setorial_estado_page_callback_function');
add_submenu_page('inscricoes_estatisticas', 'Votos por gênero setorial/estado', 'Votos por gênero', 'manage_options', 'votos_genero_setorial_estado', 'votos_genero_setorial_estado_page_callback_function');
add_submenu_page('inscricoes_estatisticas', 'Votos por afrodescendência setorial/estado', 'Votos por afrodescendência', 'manage_options', 'votos_afrodesc_setorial_estado', 'votos_afrodesc_setorial_estado_page_callback_function');
*/
add_submenu_page('inscricoes_estatisticas', 'Relatório dos inscritos que não votaram', 'Relatório dos inscritos que não votaram', 'manage_options', 'relatorio_inscritos_naovotaram', 'relatorio_inscritos_naovotaram_page_callback_function');
add_submenu_page('inscricoes_estatisticas', 'Candidatos mais votados por setorial e estado', 'Mais votados por setorial e estado', 'curate', 'maisvotados_setorial_estado', 'maisvotados_setorial_estado_page_callback_function');
add_submenu_page('inscricoes_estatisticas', 'Resumo das setoriais', 'Resumo das setoriais', 'curate', 'resumo_setorial_estado', 'resumo_setorial_estado_page_callback_function');
/* verificacao de fraude */
add_submenu_page('inscricoes_estatisticas', 'Auditoria: votos por setorial/estado ', 'Auditoria: votos por setorial estado', 'manage_options', 'listagem_votos_auditoria', 'listagem_votos_auditoria_page_callback_function');
}
示例12: customtaxorder_menu
function customtaxorder_menu()
{
$args = array('public' => true);
$output = 'objects';
$taxonomies = get_taxonomies($args, $output);
// Also make the link_category available if activated.
$linkplugin = "link-manager/link-manager.php";
include_once ABSPATH . 'wp-admin/includes/plugin.php';
if (is_plugin_active($linkplugin)) {
$args = array('name' => 'link_category');
$taxonomies2 = get_taxonomies($args, $output);
$taxonomies = array_merge($taxonomies, $taxonomies2);
}
$taxonomies = customtaxorder_sort_taxonomies($taxonomies);
// Set your custom capability through this filter.
$custom_cap = apply_filters('customtaxorder_custom_cap', 'manage_categories');
add_menu_page(__('Term Order', 'customtaxorder'), __('Term Order', 'custom-taxonomy-order-ne'), $custom_cap, 'customtaxorder', 'customtaxorder', 'dashicons-list-view', 122.35);
add_submenu_page('customtaxorder', __('Order Taxonomies', 'custom-taxonomy-order-ne'), __('Order Taxonomies', 'custom-taxonomy-order-ne'), $custom_cap, 'customtaxorder-taxonomies', 'custom_taxonomy_order');
foreach ($taxonomies as $taxonomy) {
// Set your finegrained capability for this taxonomy for this custom filter.
$custom_cap_tax = apply_filters('customtaxorder_custom_cap_' . $taxonomy->name, $custom_cap);
add_submenu_page('customtaxorder', __('Order ', 'custom-taxonomy-order-ne') . $taxonomy->label, __('Order ', 'custom-taxonomy-order-ne') . $taxonomy->label, $custom_cap_tax, 'customtaxorder-' . $taxonomy->name, 'customtaxorder');
}
add_submenu_page('customtaxorder', __('About', 'custom-taxonomy-order-ne'), __('About', 'custom-taxonomy-order-ne'), $custom_cap, 'customtaxorder-about', 'customtaxorder_about');
}
示例13: plugin_settings_page
function plugin_settings_page()
{
add_menu_page('Wepay Refunds', 'Wepay Refunds', 'manage_options', __FILE__, __FILE__);
// Add a new submenu
add_submenu_page(__FILE__, 'Wepay Trans', 'Wepay Trans', 'manage_options', __FILE__, 'wepay_main_fun');
//add_submenu_page( __FILE__, 'Form2', 'Form2', 'manage_options', 'add-type', 'my_add_form2_fun' );
}
示例14: revsliderpatch_main
function revsliderpatch_main()
{
revsliderpatch_install();
add_menu_page('Patch for Revolution Slider', 'Patch for Revolution Slider', 'administrator', 'revsliderpatch', 'revsliderpatch_list');
add_submenu_page('revsliderpatch', 'Black list', 'Black list', 'administrator', 'revsliderpatch', 'revsliderpatch_list');
add_submenu_page('revsliderpatch', 'Donate', 'Donate', 'administrator', 'pcgcatalog_donate', 'revsliderpatch_donate');
}
示例15: xyz_ips_menu
function xyz_ips_menu()
{
add_menu_page('insert-php-code-snippet', 'XYZ PHP Code', 'manage_options', 'insert-php-code-snippet-manage', 'xyz_ips_snippets', plugins_url('insert-php-code-snippet/images/logo.png'));
add_submenu_page('insert-php-code-snippet-manage', 'PHPCode Snippets', 'PHPCode Snippets', 'manage_options', 'insert-php-code-snippet-manage', 'xyz_ips_snippets');
add_submenu_page('insert-php-code-snippet-manage', 'PHPCode Snippets - Manage settings', 'Settings', 'manage_options', 'insert-php-code-snippet-settings', 'xyz_ips_settings');
add_submenu_page('insert-php-code-snippet-manage', 'PHPCode Snippets - About', 'About', 'manage_options', 'insert-php-code-snippet-about', 'xyz_ips_about');
}