Switch language

wpseek.com
A WordPress-centric search engine for devs and theme authors




remove_submenu_page [ WordPress Function ]

remove_submenu_page ( $menu_slug, $submenu_slug )
Parameters:
  • (string) $menu_slug The slug for the parent menu
  • (string) $submenu_slug The slug of the submenu
Returns:
  • (array|bool) The removed submenu on success, False if not found
Defined at:



Remove an admin submenu

Source


<?php
function remove_submenu_page$menu_slug$submenu_slug ) {
    global 
$submenu;

    if ( !isset( 
$submenu[$menu_slug] ) )
        return 
false;

    foreach ( 
$submenu[$menu_slug] as $i => $item ) {
        if ( 
$submenu_slug == $item[2] ) {
            unset( 
$submenu[$menu_slug][$i] );
            return 
$item;
        }
    }

    return 
false;
}
?>

Examples [ wp-snippets.com ]

Top Google zoekresultaten

Meer ...

Gebruikersdiscussies [ wordpress.org ]

0 User Note(s)

Nog geen één. Wees de eerste!

Nieuw toevoegen ...



HTML5 Powered with CSS3 / Styling, Performance & Integration, and Semantics