How to hide dashboard menu items added by some plugins.

HI,

I am trying to customise users’ dashboards.

I have installed the "toggle meta boxes" .

Plus I have also installed the "supporter-remove-menu-items.php" plugin that I have found on a post in this forum, to get more flexibility

I managed to customise to dashboard menu as far as the standard menu and submenus go. But I can’t remove some submenu items added by plugins in the Settings menu.

I have also installed the mu-pluggin-manager plugin, but even if I allow a plugin for supporter only, I still get the corresponding submenu item (in Settings) for none supporters. (exemples Google map, WP_thread comments, Email)

I would also like to remove some top-level menu items like "Forum", "Supporter". ( I actually don’t want none supporteer to see the supporter menu because I want to control who has supporter’s rights).

Could you please indicate how to access these none standard menu items so that I can add them in my "supporter-remove-menu-items.php" file?

Thanks

Catherine

  • Qlof
    • The Crimson Coder

    The latest thing among plugin writers seems to be adding a plugin to the dashboard. For the social media plugin I’ve been editing the plugin but it updates alot so it would be better for me to try with Andrews suggestion.

  • cat28
    • Flash Drive

    Hi,

    I tried Andrews’ method cause it would have been nice to have the dashboards management centralised, but somehow the remove_action() in the supporter_remove_menu_items had no effect.

    So I used the condition is_supporter() before the line that adds the menu in each plugin. For the wp_mail, I found that we can add the WPMAIL config in the main wp-config, this way it is not accessible via the dashboard which I’m quite happy with.

    I have one remaining problem: there are some dashboard menu items that i’d like to show only to the site admin and not to any other blog admin. I tried to check for the condition (is_site_admin( )) , the same way as (is_supporter()), but it does not work, I also tried

    (user_level == 10), no luck.

    Do you know how to make options available to the main site admin only (or even to a single user) ?

    Thanks

    Catherine

  • cat28
    • Flash Drive

    Hi,

    I tried if (!is_site_admin() ){} for items in Settings submenu. For instance items from wp_threaded_comments or AdThis (for addthis in particular, I don’t really want user to add anything) plus the config look a bit too complex and I think it’s just asking for trouble to leave that accessible to users.

    OK, I could live with that and trust the supporters.

    Then, while I am on the suject of dashboard customisation for users, I have one last big problem, I would like to select what widgets are accessible. I have tried the function described here for a good few hours now

    http://mu.wordpress.org/forums/topic.php?id=9033

    But either I don’t use it properly, or it does not work with WPMU 2.8. Eitherway, the list of available widget remains unchanged.

    Thanks

    Catherine

  • Aaron
    • Ex Staff

    If you’re talking about widgets in the Widgets menu, the widget names just changed in WPMU 2.8.

    You can still remove them using the same method (unregister_sidebar_widget), just use the right name:

    * WP_Widget_Archives — Archives

    * WP_Widget_Calendar — Calendar

    * WP_Widget_Categories — Categories

    * WP_Widget_Links — Links

    * WP_Widget_Meta — Meta

    * WP_Widget_Pages — Pages

    * WP_Widget_Recent_Comments — Recent Comments

    * WP_Widget_Recent_Posts — Recent Posts

    * WP_Widget_RSS — RSS

    * WP_Widget_Search — Search (a search from)

    * WP_Widget_Tag_Cloud — Tag Cloud

    * WP_Widget_Text — Text