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


PHP remove_submenu_page函数代码示例

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


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

示例1: my_remove_menu_pages

function my_remove_menu_pages()
{
    //remove_menu_page( 'edit.php' ); // Posts
    //remove_menu_page( 'upload.php' ); // Media
    remove_menu_page('link-manager.php');
    // Links
    remove_menu_page('edit-comments.php');
    // Comments
    remove_menu_page('edit.php?post_type=page');
    // Pages
    remove_submenu_page('edit.php', 'edit-tags.php?taxonomy=category');
    remove_submenu_page('edit.php', 'edit-tags.php?taxonomy=post_tag');
    //remove_menu_page( 'plugins.php' ); // Plugins
    //remove_menu_page( 'themes.php' ); // Appearance
    //remove_menu_page( 'users.php' ); // Users
    remove_menu_page('tools.php');
    // Tools
    //remove_menu_page( 'profile.php' ); // Tools
    //remove_menu_page('options-general.php'); // Settings
    //remove_submenu_page ( 'index.php', 'update-core.php' );    //Dashboard->Updates
    //remove_submenu_page ( 'themes.php', 'themes.php' ); // Appearance-->Themes
    //remove_submenu_page ( 'themes.php', 'widgets.php' ); // Appearance-->Widgets
    //remove_submenu_page ( 'themes.php', 'theme-editor.php' ); // Appearance-->Editor
    //remove_submenu_page ( 'options-general.php', 'options-general.php' ); // Settings->General
    //remove_submenu_page ( 'options-general.php', 'options-writing.php' ); // Settings->writing
    //remove_submenu_page ( 'options-general.php', 'options-reading.php' ); // Settings->Reading
    //remove_submenu_page ( 'options-general.php', 'options-discussion.php' ); // Settings->Discussion
    //remove_submenu_page ( 'options-general.php', 'options-media.php' ); // Settings->Media
    //remove_submenu_page ( 'options-general.php', 'options-privacy.php' ); // Settings->Privacy
}
开发者ID:yashodhank,项目名称:wpds,代码行数:30,代码来源:functions.php

示例2: modify_menu

 /**
  * Modifies the admin menu for specific roles.
  *
  * @since v1.0.0
  * @access private
  */
 function modify_menu()
 {
     if (jc_userroles_current_role() != 'jobs_for_jets_manager') {
         return;
     }
     remove_submenu_page('edit.php?post_type=event', 'event-calendar');
 }
开发者ID:JacksonCollege,项目名称:jc-user-roles,代码行数:13,代码来源:class-jc-userroles-jobsforjetsmanager.php

示例3: uas_edit_admin_menus

/**
 * Remove menu items on a per user bases
 */
function uas_edit_admin_menus()
{
    global $menu;
    global $current_user;
    global $storedmenu;
    global $storedsubmenu;
    global $submenu;
    // Store the original menu
    $storedmenu = $menu;
    // Store the original submenu
    $storedsubmenu = $submenu;
    $uas_options = uas_get_admin_options();
    $newmenu = array();
    if (!isset($menu)) {
        return;
    }
    // Rebuild menu based on saved options
    foreach ($menu as $menuitem) {
        if (isset($menuitem[5]) && isset($uas_options[$current_user->user_nicename][sanitize_key($menuitem[5])]) && 1 == $uas_options[$current_user->user_nicename][sanitize_key($menuitem[5])]) {
            remove_menu_page($menuitem[2]);
        } else {
            // Lets check the submenus
            if (isset($storedsubmenu[$menuitem[2]])) {
                foreach ($storedsubmenu[$menuitem[2]] as $subsub) {
                    $combinedname = sanitize_key($menuitem[5] . $subsub[2]);
                    if (isset($subsub[2]) && isset($uas_options[$current_user->user_nicename][$combinedname]) && 1 == $uas_options[$current_user->user_nicename][$combinedname]) {
                        remove_submenu_page($menuitem[2], $subsub[2]);
                    }
                }
            }
        }
    }
}
开发者ID:adamsilverstein,项目名称:user-admin-simplifier,代码行数:36,代码来源:useradminsimplifier.php

示例4: hide_menu

function hide_menu()
{
    global $current_user;
    $user_id = get_current_user_id();
    // echo "user:".$user_id;   // Use this to find your user id quickly
    if ($user_id != '1') {
        remove_menu_page('index.php');
        //Dashboard
        remove_menu_page('upload.php');
        //Media
        remove_menu_page('edit-comments.php');
        //Comments
        remove_menu_page('plugins.php');
        //Plugins
        remove_submenu_page('themes.php', 'themes.php');
        remove_submenu_page('themes.php', 'theme-editor.php');
        remove_submenu_page('themes.php', 'customize.php');
        remove_menu_page('nav-menus.php');
        //Editar Menus
        // remove_menu_page( 'users.php' );                  	Users
        remove_menu_page('tools.php');
        //Tools
        remove_menu_page('options-general.php');
        //Settings
        remove_menu_page('edit.php?post_type=acf');
        //Advanced Custom Fields
        remove_menu_page('admin.php?page=cpt_main_menu');
        //Custom Post Types
        remove_menu_page('themes.php');
        //Custom Fields
    }
}
开发者ID:raidho-mx,项目名称:groundplay,代码行数:32,代码来源:functions.php

示例5: d7_remove_menus

/**
 * Remove some admin menu items
 * 
 * @package d7
 * @subpackage boilerplate-plugin_filters+hooks
 * @internal only called as `admin_menu` action
 * 
 */
function d7_remove_menus()
{
    remove_menu_page('edit.php');
    remove_menu_page('edit-comments.php');
    remove_submenu_page('themes.php', 'theme-editor.php');
    remove_submenu_page('plugins.php', 'plugin-editor.php');
}
开发者ID:nathansh,项目名称:nathansh.com-plugin,代码行数:15,代码来源:admin.php

示例6: nicdark_remove_taxonomy_packages

function nicdark_remove_taxonomy_packages()
{
    remove_submenu_page('edit.php', 'edit-tags.php?taxonomy=destination-package');
    remove_submenu_page('edit.php', 'edit-tags.php?taxonomy=typology-package');
    remove_submenu_page('edit.php', 'edit-tags.php?taxonomy=duration-package');
    remove_submenu_page('edit.php', 'edit-tags.php?taxonomy=person-package');
}
开发者ID:LuisEnVilla,项目名称:viajes400,代码行数:7,代码来源:packages.php

示例7: remove_admin_menus

 /**
  * Remove admin pages for updates and extensions
  *
  * @since 0.0.1
  * @return void
  */
 public function remove_admin_menus()
 {
     /** Remove Gravity Forms Update page */
     remove_submenu_page('gf_edit_forms', 'gf_update');
     remove_submenu_page('gf_new_form', 'gf_update');
     remove_submenu_page('gf_entries', 'gf_update');
 }
开发者ID:TripleYou,项目名称:disable-updates,代码行数:13,代码来源:gravityforms.php

示例8: admin_head

    /**
     * Add styles just for this page, and remove dashboard page links.
     */
    public function admin_head()
    {
        remove_submenu_page('index.php', 'sm-about');
        remove_submenu_page('index.php', 'sm-faqs');
        remove_submenu_page('index.php', 'sm-beta');
        ?>
		<style type="text/css">
			/*<![CDATA[*/
			.about-wrap h3 {
				margin-top: 1em;
				margin-right: 0em;
				margin-bottom: 0.1em;
				font-size: 1.25em;
				line-height: 1.3em;
			}
			.about-wrap p {
				margin-top: 0.6em;
				margin-bottom: 0.8em;
				line-height: 1.6em;
				font-size: 14px;
			}
			.about-wrap .feature-section {
				padding-bottom: 5px;
			}
			/*]]>*/
		</style>
		<?php 
    }
开发者ID:JaneJieYing,项目名称:kiddoonline_dvlpment,代码行数:31,代码来源:class-smart-manager-admin-welcome.php

示例9: remove_admin_submenus

function remove_admin_submenus()
{
    global $current_user;
    wp_get_current_user();
    if ($current_user->user_level < 10) {
        remove_submenu_page('themes.php', 'theme-editor.php');
        remove_submenu_page('themes.php', 'themes.php');
        //remove_submenu_page( 'edit.php', 'edit-tags.php?taxonomy=post_tag' );
        //remove_submenu_page( 'edit.php', 'edit-tags.php?taxonomy=category' );
        //remove_submenu_page( 'edit.php', 'post-new.php' );
        //remove_submenu_page( 'themes.php', 'nav-menus.php' );
        remove_submenu_page('themes.php', 'widgets.php');
        remove_submenu_page('themes.php', 'theme-editor.php');
        remove_submenu_page('plugins.php', 'plugin-editor.php');
        remove_submenu_page('plugins.php', 'plugin-install.php');
        //remove_submenu_page( 'users.php', 'users.php' );
        remove_submenu_page('users.php', 'user-new.php');
        //remove_submenu_page( 'upload.php', 'media-new.php' );
        remove_submenu_page('options-general.php', 'options-writing.php');
        remove_submenu_page('options-general.php', 'options-discussion.php');
        remove_submenu_page('options-general.php', 'options-reading.php');
        remove_submenu_page('options-general.php', 'options-discussion.php');
        remove_submenu_page('options-general.php', 'options-media.php');
        remove_submenu_page('options-general.php', 'options-privacy.php');
        remove_submenu_page('options-general.php', 'options-permalinks.php');
        remove_submenu_page('index.php', 'update-core.php');
        remove_action('welcome_panel', 'wp_welcome_panel');
    }
}
开发者ID:lgm243,项目名称:WORDPRESS,代码行数:29,代码来源:gestion-admin.php

示例10: remove_menus

function remove_menus()
{
    //remove_menu_page( 'index.php' );             	//Dashboard
    remove_submenu_page('index.php', 'update-core.php');
    //remove_submenu_page( $menu_slug, $submenu_slug );
    remove_menu_page('edit.php');
    //Posts
    remove_menu_page('upload.php');
    //Media
    remove_menu_page('edit.php?post_type=page');
    //Pages
    remove_menu_page('edit-comments.php');
    //Comments
    remove_menu_page('themes.php');
    //Appearance
    remove_menu_page('plugins.php');
    //Plugins
    remove_menu_page('users.php');
    //Users
    remove_menu_page('tools.php');
    //Tools
    remove_menu_page('options-general.php');
    //Settings
    remove_menu_page('edit.php?post_type=acf');
    //ACF
}
开发者ID:Alefal,项目名称:amalficoastapps.it,代码行数:26,代码来源:functions.php

示例11: pix_admin_menu

function pix_admin_menu()
{
    $pix_menu = add_menu_page(__('Pix Plugins', 'pix'), __('Pix Plugins', 'pix'), 'manage_options', 'pix-plugins', NULL, INFINITE_LOAD_URL . '/images/logo.png');
    $pix_infinite_load_menu = add_submenu_page('pix-plugins', __('Infinite Load', 'pix'), __('Infinite Load', 'pix'), 'manage_options', 'pix-infinite-load', 'pix_infinite_load_settings');
    remove_submenu_page('pix-plugins', 'pix-plugins');
    add_action('admin_print_scripts-' . $pix_infinite_load_menu, 'pix_add_admin_assets');
}
开发者ID:webprese,项目名称:dev.mgeonline,代码行数:7,代码来源:index.php

示例12: ground_remove_menu_links

function ground_remove_menu_links()
{
    remove_menu_page('index.php');
    // Dashboard
    remove_menu_page('edit.php');
    // Posts
    remove_menu_page('upload.php');
    // Media
    remove_menu_page('edit.php?post_type=page');
    // Pages
    remove_menu_page('edit-comments.php');
    // Comments
    remove_menu_page('themes.php');
    // Appearance
    remove_menu_page('plugins.php');
    // Plugins
    remove_menu_page('users.php');
    // Users
    remove_menu_page('tools.php');
    // Tools
    remove_menu_page('options-general.php');
    // Settings
    remove_submenu_page('themes.php', 'theme-editor.php');
    // Submenu
}
开发者ID:naeemnur,项目名称:ground,代码行数:25,代码来源:extend-administration.php

示例13: jk_remove_menus

function jk_remove_menus()
{
    // Posts
    remove_menu_page('edit.php');
    // Comments
    remove_menu_page('edit-comments.php');
    // Projects
    remove_menu_page('edit.php?post_type=project');
    // Testimonials
    remove_menu_page('edit.php?post_type=testimonial');
    // Profile
    remove_menu_page('profile.php');
    // Remove for all users below Administrator
    $user = wp_get_current_user();
    if (!$user->has_cap('manage_options')) {
        // Tools
        remove_menu_page('tools.php');
        // My Sites
        remove_menu_page('my-sites.php');
    }
    // Remove for all users below Super-Admin
    $user = wp_get_current_user();
    if (!$user->has_cap('manage_network')) {
        // Plugins
        remove_menu_page('plugins.php');
        // Widgets submenu
        $page = remove_submenu_page('themes.php', 'widgets.php');
    }
}
开发者ID:josephkes,项目名称:Customise-WordPress-Admin,代码行数:29,代码来源:customise-wp-admin.php

示例14: popmake_remove_admin_subpages

function popmake_remove_admin_subpages()
{
    remove_submenu_page('index.php', 'popmake-about');
    remove_submenu_page('index.php', 'popmake-changelog');
    remove_submenu_page('index.php', 'popmake-getting-started');
    remove_submenu_page('index.php', 'popmake-credits');
}
开发者ID:raminabsari,项目名称:phonicsschool,代码行数:7,代码来源:admin-pages.php

示例15: tb_newsletter_menu

function tb_newsletter_menu()
{
    add_menu_page('Newsletter', 'Newsletter', 'manage_options', 'newsletter', '', 'dashicons-email-alt');
    add_submenu_page('newsletter', 'Envoyer', 'Envoyer la newsletter', 'manage_options', 'newsletter_send', 'tb_newsletter_send');
    add_submenu_page('newsletter', 'Réglages', 'Réglages', 'manage_options', 'newsletter_config', 'tb_newsletter_config');
    remove_submenu_page('newsletter', 'newsletter');
}
开发者ID:kstefanini,项目名称:ep-plugin,代码行数:7,代码来源:newsletter.php


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