Skip to content

Commit

Permalink
links are no longer in menu
Browse files Browse the repository at this point in the history
  • Loading branch information
billerickson committed May 25, 2016
1 parent b4ff321 commit 4e52fa7
Showing 1 changed file with 0 additions and 21 deletions.
21 changes: 0 additions & 21 deletions inc/general.php
Expand Up @@ -36,27 +36,6 @@ function be_dont_update_core_func_plugin( $r, $url ) {
add_filter( 'widget_text', 'do_shortcode' );


/**
* Remove Menu Items
* @since 1.0.0
*
* Remove unused menu items by adding them to the array.
* See the commented list of menu items for reference.
*
*/
function be_remove_menus () {
global $menu;
$restricted = array(__('Links'));
// Example:
//$restricted = array(__('Dashboard'), __('Posts'), __('Media'), __('Links'), __('Pages'), __('Appearance'), __('Tools'), __('Users'), __('Settings'), __('Comments'), __('Plugins'));
end ($menu);
while (prev($menu)){
$value = explode(' ',$menu[key($menu)][0]);
if(in_array($value[0] != NULL?$value[0]:"" , $restricted)){unset($menu[key($menu)]);}
}
}
add_action( 'admin_menu', 'be_remove_menus' );

/**
* Pretty Printing
*
Expand Down

0 comments on commit 4e52fa7

Please sign in to comment.