Skip to content

Instantly share code, notes, and snippets.

@bryanwillis
Created June 17, 2014 16:35
Show Gist options
  • Save bryanwillis/6da0549f1faa01ec9f47 to your computer and use it in GitHub Desktop.
Save bryanwillis/6da0549f1faa01ec9f47 to your computer and use it in GitHub Desktop.
* The elements in the array are :
* 0: Menu item name
* 1: Minimum level or capability required.
* 2: The URL of the item's file
* 3: Class
* 4: ID
* 5: Icon for top level menu
* @global array $menu
/**
* Fires before the administration menu loads in the User Admin.
* The hook fires before menus and sub-menus are removed based on user privileges.
*/
do_action( '_user_admin_menu' );
/**
* Fires before the administration menu loads in the admin.
* The hook fires before menus and sub-menus are removed based on user privileges.
*/
do_action( '_admin_menu' );
add_filter( 'custom_menu_order', '__return_true' );
$menu_order = apply_filters( 'menu_order', $menu_order );
do_action( 'admin_page_access_denied' );
wp_die( __('You do not have sufficient permissions to access this page.') );
/**
* Filter administration menus array with classes added for top-level items.
*
* @since 2.7.0
*
* @param array $menu Associative array of administration menu items.
*/
return apply_filters( 'add_menu_classes', $menu );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment