The MU forums have moved to

DS Toggle Admin Menus --- for widgets?! (1 post)

  1. Driftless1
    Posted 14 years ago #

    First off - crucial plugin. Thanks for it.

    Anyone have an idea what tiny bit of code I need to insert into this plugin to get it to hide the Widget menu option? I want my users to change themes, but not widgets.

    I'm thinking something like: (with the requisit Appearance Widgets toggle box inserted below)

    // 'Appearance Widgets'
    	if( $menu_perms[ 'Appearance Widgets' ] != '1' && current_user_can('switch_themes')) {
    		if(!empty($submenu['themes.php'])) {
    		foreach($submenu['themes.php'] as $key => $sm) {
    			if(__($sm[0]) == "Themes" || $sm[7] == "themes.php") {

    I'm posting this both as a question, and as a potential (as of yet untested) solution?

About this Topic

  • Started 14 years ago by Driftless1