• Skip to primary navigation
  • Skip to main content
  • Skip to primary sidebar

My Monkey Do

A Log of Coding Solutions

  • Home
  • Web Hosts
  • Tools
  • About

WordPress CMS Plugins

June 15, 2011 by Webhead

WordPress has tons of features, but most clients just need to edit pages and want a content management system.  I needed to get rid of all the fat.

Complicated Menus

To get rid of the menus on the dashboard for all roles except the admin place the following code in the functions.php of your theme.

function remove_menus () {
    global $menu;
    if (!(current_user_can('install_themes'))) {
        $restricted = array(__('Dashboard'), __('Posts'), __('Media'), __('Links'), __('Pages'), __('Appearance'), __('Tools'), __('Users'), __('Settings'), __('Comments'), __('Plugins'));
    }
    else {
        return;
    }
	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', 'remove_menus');

Thanks to http://www.wprecipes.com/how-to-remove-menus-in-wordpress-dashboard

Redirected Login

A problem that arises from this is the dashboard is pretty much useless.  You can use this plugin to redirect a user to a specific page based on their role:  http://wordpress.org/extend/plugins/peters-login-redirect/

Easy TinyMCE adjustments

One plugin that makes this very simple:  http://wordpress.org/extend/plugins/tinymce-advanced/

 

Filed Under: Coding Tagged With: php, wordpress

Primary Sidebar

Topics

apache apple block editor chrome cms css debug eCommerce embed firebug firefox git gmail goDaddy google hosting htaccess html html 5 IE crap image iPad iPhone javascript jquery linux localization mac os x ms sql mysql open source optimize php php 5.3 responsive rest api seo svg tinymce woocommerce wordpress wpengine xss yii youtube




Categories

  • Coding
  • Off the Shelf
  • Plugins
  • Random Thoughts
  • Server Stuff
  • Tools