The MU forums have moved to WordPress.org

How to Modify Blog Admin Menu Bar (8 posts)

  1. kgormley
    Member
    Posted 16 years ago #

    I'm trying to modify the options menu bar for the blog admin window. Need to delete one option and add one option.

    Looking at the options-general.php, it links to several php files and to several pages. /options-general.php?page=this_specific_page

    Where is the this_function file located? How can I delete an item from the menu?

    Thanks for your patience for this WPMU newbie question.

  2. dsader
    Member
    Posted 16 years ago #

    Works this way in WP2.5 and the WPMU1.5:

    For example, the following function removes the "Themes" Dashboard-->Design menu link to the themes.php and replaces it with a "DS Themes" link to a function ds_themes:

    function remove_themes_menu_item(){
    	global $submenu;
    $submenu['themes.php'][5] = array(__('DS Themes'), 'ds_themes', 'themes.php?page=ds_themes');
    add_theme_page( 'Themes', 'Themes', 8, 'ds_themes', 'ds_themes');
    }
    add_action('admin_menu', 'remove_themes_menu_item');

    Specifically, the /wp-admin/menu.php contains the real $submenu['themes.php'][5]

  3. kgormley
    Member
    Posted 16 years ago #

    dsader,
    Thanks so much for your reply.

    Forgive me for asking an ever dumber question, how do I add that function to the php file?

    I see several lines of php files, but not the anyplace that lists options.php?page=page_name.

    $submenu['options.php'][5]=array...
    $submenu['options.php'][10]=array...
    $submenu['options.php'][15]=array...

    Thanks!
    -Kevin

  4. dsader
    Member
    Posted 16 years ago #

    You need to create a new file "remove_menu_blah.php".

    Stick a function like the one I've done above in it.

    Put the new file into the mu-plugins folder.

    What menu item(s) do you want to remove?

  5. boonika
    Member
    Posted 16 years ago #

    Thanks dsader. Interesting information... and useful. Can it be applied only for sub-blogs and not for the main blog? Maybe it would work that way if we put it inide 'plugins' folder???

    Actually, I would like to hide some options so blog owners can not see them... except the MU administrator of course. Maybe the solution is to change default role (inside some .php file that defines roles) for the blog owner (from 'administrator' to 'editor') and than create a plugin and put it inside 'plugins' or 'mu-plugins' folder. I prefer 'plugins' cause than I can activate/deactivate those functions for particular blog.

    I would like to remove the following:
    1. Write/Write Post
    2. Writw/Write Page
    3. Write/Add Link
    4. Manage (and everything under it except Manage Pges and Media Library)
    5. Design (and everything under it)
    6. Comments (and everything under it)
    7. Settings (and everything under it)
    8. Plugins
    9. Users/Authors&Users

    Dsader, what do you think? Can it be done the same way that
    you described above?

    Thanks

  6. boonika
    Member
    Posted 16 years ago #

    @kgormley

    Try this: http://freshout.us/goodies/fresh-post-for-wordpress-wordpress-cms/

    I tried it and it looks like it's working with MU. I think that guys (boys and girls) from WPMUDEV should take a closer look at this plugin cause original authors have no interest in developing it further for MU.

  7. kgormley
    Member
    Posted 15 years ago #

    Boonika,
    Thanks for the response. Sorry for the delayed reply (I was out traveling and wasn't able to keep up on forums).

    -Kevin

  8. boonika
    Member
    Posted 15 years ago #

    No problem

About this Topic

  • Started 16 years ago by kgormley
  • Latest reply from boonika