Version 2.1

WP Hide Dashboard version 2.1 was released on 2/23/2011 for WordPress 3.1.

Description: This plugin removes the Dashboard menu, the Personal Options section and the Help link on the Profile page, hides the Dashboard links in the admin bar menu (if activated), and prevents Dashboard access to users assigned to the Subscriber role. Useful if you allow your subscribers to edit their own profiles, but don't want them wandering around your WordPress admin section.

Users belonging to any of the other WordPress roles will continue to see and have access to the other sections of the WordPress admin that correspond to their role's capabilities.

WP Hide Dashboard 2.1 has been tested with WordPress in single user mode, Multisite mode, and with BuddyPress, and works with all of them.

What's New:

  • Support for WordPress version 2.9 and 3.0 removed.
  • Support for roles other than Subscriber removed.
  • Reworked code for removing Personal Options section on Profile page.
  • Added support for removing Dashboard links in new admin bar.
  • Added support for WordPress Multisite (mu-plugins and network-activation capable).

Note: Version 2.1 requires a minimum of WordPress 3.1. If you are running a version less than that, please upgrade your WordPress install before installing or upgrading.

Screenshots:

WordPress 3.1 default Subscribers profile page (single user - admin bar dropdown showing)
WordPress 3.1 default Subscribers profile page (single user - admin bar
dropdown showing)

WordPress 3.1 Subscribers profile page with WP Hide Dashboard activated (single user - admin bar dropdown showing)
WordPress 3.1 Subscribers profile page with WP Hide Dashboard activated
(single user - admin bar dropdown showing)

WordPress 3.1 default Subscribers profile page (Multisite - admin bar showing)
WordPress 3.1 default Subscribers profile page (Multisite - admin bar
showing)

WordPress 3.1 Subscribers profile page with WP Hide Dashboard activated (Multisite - admin bar showing)
WordPress 3.1 Subscribers profile page with WP Hide Dashboard activated
(Multisite - admin bar showing)

WordPress 3.1 website (Multisite - admin bar dropdown showing)
WordPress 3.1 website (Multisite - admin bar dropdown showing)

WordPress 3.1 website with WP Hide Dashboard activated (Multisite - admin bar dropdown showing)
WordPress 3.1 website with WP Hide Dashboard activated (Multisite -
admin bar dropdown showing)

50 Responses to Version 2.1

  1. Adrian says:

    Problem with plugin, error log generate this error

    [25-Feb-2011 21:34:06] PHP Notice: Trying to get property of non-object in /home/.../public_html/wp-content/plugins/wp-hide-dashboard/wp-hide-dashboard.php on line 48

    check it.

    • Kim says:

      @Adrian: My apologies for the delay - your comment was tagged by Akismet as spam.

      Thanks for letting me know. I'll look into it and get back with you.

      • Polly says:

        Dear Kim,
        It is possible to install your plugin if I'm running WP 3.4.2?
        I appreciate your time and effort to answer to me:)
        Thank you
        best,
        Polly

  2. Jack Stewart says:

    love the plugin, works with no problems.

    kind of irrelevant, but im trying to hide the media tab also, could i modify your plugin to do this also? or is there a plugin that does this already?

    • Kim says:

      Have you modified my plugin to work with another role? The reason I ask is that subscribers don't see the Media link - all they are allowed to see (by WordPress) are the Dashboard and Profile links.

      • Jack Stewart says:

        oops, don't know how "upload files" got into subscriber role.
        thanks!

        i'll be donating as soon i get some extra cash my way :D

        • Kim says:

          @Jack: Glad you got things sorted out. :)

          I don't have a donate button set up to accept monetary donations. How about you send the amount of your donation to the American Red Cross and earmark it for the Japanese earthquake relief effort? They need all the help they can get over there.

  3. Clay Campbell says:
    Notice: Trying to get property of non-object in /home/sovi/sensovi.com/ecampus/CITY/wp-content/plugins/wp-hide-dashboard/wp-hide-dashboard.php on line 105
     
    if ((!current_user_can(''.$wphd_user_capability.'') || !current_user_can_for_blog($blog->userblog_id, ''.$wphd_user_capability.'')) && is_admin_bar_showing()) {

    I'm guessing the error is caused by $blog->userblog_id. I'm not sure where the global object $blog comes from? Is that a standard WordPress global object, or does that need to be set at the start of the plugin?

    Thanks for you time.

    • Clay Campbell says:

      Oops, I pasted in line 48, but it has the same call to the global $blog too.

      Anyway, I can confirm it is this bit of code causing the warning $blog->userblog_id

      Digging around, I'm wondering if this method call is a good replacement for using the $blog global?

      http://codex.wordpress.org/WPMU_Functions/get_blogs_of_user

      Thanks again.

      • Kim says:

        @Clay: Thanks for letting me know. Another user posted about the same issue. I've looked into it and have a fix for it already. Need to do a bit of testing before I release an updated version.

        The global $blog is a standard WordPress global object used in WordPress Multisite. This plugin now supports single-user mode as well as Multisite, so all globals necessary for both versions needed to be declared in the plugin.

        get_blogs_of_user() wouldn't work in this situation. I don't need to get the details about the blogs they are assigned to, just whether they have a role on that particular blog and the proper capability to go with that role, in this case, the Subscriber role. current_user_can_for_blog() works perfectly for that purpose.

  4. Calvin says:

    Thanks for the plugin!

    I just have one issue. The Dashboard option still shows in the Admin Bar on site view. The link in fact redirects to User Profile and subscriber user can't access the Dashboard.

    But both links User Profile and Dashboard are showing in the Admin Bar menu. I am using Theme My Profile Plugin. Any idea about this issue?

    • Calvin says:

      Sorry, please read "Theme my Login" plugin above.

      • Kim says:

        @Calvin: As I told 3dolab below, I've not worked with the Theme My Login plugin, so I'm not familiar with it at all. I'll take a look and see if I can identify what the conflict is.

  5. 3dolab says:

    Hello, this plugin is really useful since there is no easy way to manually remove the personal options form fields from the user profile, whereas it seems that the contact informations could be simply 'unset'.

    However, it does work on dashboard pages, but not in the frontend "themed profiles".
    Let me explain: I'm using the 'Theme My Login' plugin to display login, registration and personal options forms in themed style. Nothing changes there after activating 'WP Hide Dashboard'.

    It's not really a conflict, but just incompatibility. Now I'm going to read both the plugins code and try to hack it in order to achieve my goal somehow.
    In the meantime, have you any suggestion or are you planning to implement it in the near future?

    • Kim says:

      3dolab: The plugin will not remove any parts of a public-facing profile that's created with another plugin. The only thing WP Hide Dashboard does on the public-facing site pertains strictly to the links in the admin bar. I've not worked with the Theme My Login plugin, so I'm not familiar with it.

      • 3dolab says:

        Thank you, and please don't mind my question...
        I have been misled by the fact that any additional custom field added to the admin login and profile forms is reflected in the frontend porting made by the 'Theme My Login' plugin.
        Actually, there are some php files that need to be copied from the plugin folder to the theme in order to get a custom form.

        • Kim says:

          @3dolab: Will copying those template files to your theme and modifying them resolve your original question/issue?

  6. Magsi says:

    Hello,
    I am using latest wordpress single and buddypress latest version and I just want to remove dashboard link from bp admin bar please help me.
    Thanks.

    • Kim says:

      @Magsi: Right now, the plugin only works with the WordPress admin bar, no the BuddyPress admin bar. I can take a look to see if I can add that functionality to the plugin.

  7. Clay says:

    To remove the admin bar completely, you can do so without a plugin.

    Add this to your header.php

    http://codex.wordpress.org/Function_Reference/show_admin_bar

    • Kim says:

      @Clay: I'm not sure who your comment is directed to, since none of the previous commenters asked how to remove the admin bar. Just an FYI, the link you provided recommends placing that code in the functions.php file of your theme, not header.php.

      • Clay says:

        Sorry Kim. I thought they were talking about the admin bar. I guess I put show_admin_bar(false) in the header.php because I wanted it off forward facing, but on in dashboard??? Anyway, sorry for causing FUD.

        • Kim says:

          @Clay: Not FUD, and no reason to apologize. :) In fact, this gave me the inspiration for a new blog post: Best Practice For Adding Custom Functions. Be sure to check it out - it's a good way to implement your custom functions, and get them out of your theme. I included the code for your desired admin bar functionality as the example in the post. Hope you find it helpful!

  8. Hi Kim. First off, great plugin - it's been infinitely helpful.

    I'm actually using version 2.0 since I'm unable to update to WP 3.1 (problems with other plugins). However, I have a question that applies to the current version.

    I have a theme that adds a link to the menu in the admin page below Feedback. I'd like to remove it along with all the other menu items, but I have no idea how to figure out the menu item number to use with unset. I know the core menu items are found in wp-admin/menu.php (got that from your 2.0 support page) but that doesn't help me figure out the menu item number for the theme link. Any idea how to get it? I've asked on the help forums for the theme, but the only suggestion I've gotten was to ask you. Not much help :)

    • Forget about the request, I just tried using numbers starting at 26 and working my way up - turns out 27 worked. I'm guessing the theme simply uses the next available menu number, which may differ depending upon theme and/or plugins installed. Thanks again for a great plugin!

  9. B Paul says:

    Great Plugin I must say! Unfortunately after upgrading to Word Press 3.1.2 yesterday even though I have the plugin activated, it still shows up during new user registration. Are you aware of any issues? Is there an alternative. The plugin was working perfectly fine till before the update.

  10. maximiliano says:

    hi there ...

    i have download your latest plugin WP-hide dashboard ... i have a question ... the plug in work well .. but if i want that my user after login going direct to the site ... without see the dashboard and profile page??? it's possible???

    thanks

  11. ali says:

    Hi
    I need Hide Dashboard For (Contributor). How

  12. Adam says:

    Hi. Thanks for the plugin.
    My situation -
    I am using users (subscribers) that, once logged on, are able to see the online ordering pages.
    I want to stop subscribers from accessing their wp-admin page.
    While there are no menus to it, if you type on the address bar /wp-admin and you are logged in as a subscriber, it is still possible for them to access this page and change their own settings.
    How do I prevent this?
    Quite happy to edit some code, just need to know what to do / change.
    Thank you.

  13. Jonas Flodén says:

    Hello there!
    Great plugin, just what I needed! There is problem though (and a fix :)
    The Id for the admin bar links are actually translated so when you use this plugin with non-english the links are still there. To fix it I looked at how the id is calculated and used the same method so change lines 56 and 58 to these:

    $wp_admin_bar->remove_menu(esc_attr(sanitize_title(trim(__('Edit My Profile')))));
    $wp_admin_bar->remove_menu(esc_attr(sanitize_title(trim(__('Dashboard')))));

    See line 67 in wp-includes/class-wp-admin-bar.php for how the id is calculated.

    With this fix the plugin works for me!
    Thanks!
    Jonas

    • Jonas Flodén says:

      Actually, just sanitize_title should be sufficient so you could use these instead:

      $wp_admin_bar->remove_menu(sanitize_title(__('Edit My Profile')));
      $wp_admin_bar->remove_menu(sanitize_title(__('Dashboard')));
  14. Francois says:

    Hello,

    I have a problem with your plugin. Is not compatible with my WordPress 3.2.1

    thanks for your response.

  15. Avrom says:

    Hi Kim,

    Great Plugin, but the "Media" tab is showing in the subscriber page. Using version 3.2.1

    Any ideas, or php code to force the media section off. Don't know why the "media" section is showing,or what plugin could possibly be over-riding that.

    Thanks!

  16. M Forbes says:

    just installed your plugin, thanks, but if i log in as a subscriber, i am still able to see the media folder with the ability to mess with media files. am i missing something? your help is greatly appreciated. i am using wp 3.2.1. thank you

  17. Jerry says:

    I am using WP 3.2.1 and noticed the following problem with WP Hide Dashboard 2.1:

    The dashboard is block for subscribers, but it also seems to be stopping the forum registration process. The welcome email with the initial password does not go out when the WP Hide Dashboard 2.1 is activated.

    Thank you for your help!

    Jerry

  18. Mike says:

    Hi Kim, I think, but I'm not 100% sure that your plugin is what I need. I'm changing my site from Joomla to WordPress. I was shocked to see what users who go to their profile see. Your plugin hides the dashboard stuff that appears for admins, correct? I don't want users thinking they have some kind of backend access to my WordPress site. I don't really even want the the average joe to see WordPress anywhere.. Is there no "front end" profile editing for users in WordPress?

  19. Mike says:

    Hi, I think there is a problem with the plugin, and I'll try to explain. I'm using Subscribe2 on my site, so it adds a "Your Subscriptions" link under Profile in the menu. I can click over to that link, but when I click on Profile again to go back to the edit profile screen, it doesn't go back. Do you know about this?

  20. gm says:

    Hey Kim, thanks for the great work on the plugin!
    I was wondering if you could lend your wordpress magic to help me a little. I am trying to hide the whole left section for subscribers (adminmenuwrap I believe its called). How can I achieve this please?

  21. Rick says:

    Hi Kim

    I was wondering if it would be possible to do it the other way around and hide the Profile Tab and keep the Dashboard tab?

    Your reply appreciated.

  22. Gunu says:

    Thank you !!

    Great plugin I needed now...

    Thanks again

  23. AJ says:

    Hello there,

    Firstly, thank you for a great plugin. It works like charm. I have one question as to the customization of the Admin Bar. Is there a way that I can add a link to the homepage on there? This will come handy after a user has edited her/his profile, and wants to return back to the homepage of the website. I know it can be done by pressing the logo or the back button of the browser, but having a link back to home page would improve the accessibility/user friendliness.

    Thanks for your kind support.

    AJ

  24. Hi there,

    Your plug in worked perfectly until I installed Sidebar Login. http://wordpress.org/extend/plugins/sidebar-login/

    It seems to conflict with it and stop it working.

  25. Debbie says:

    Sure would like to see an upgrade with ability to have options for showing or not showing what's on the dashboard. I installed your plugin but media was still showing for subscribers. They could potentially steal all of my photos showing in media. This may be for WordPress but since you wrote a great plugin, just my suggestion to upgrade and address this issue. I saw another post on it too so know I'm not the only one...thanks!! Keep up the good work.

  26. Scott says:

    I need this plugin but I see that support for other roles was removed. The membership plugin that I am using makes everyone a member, not a subscriber. Can this be easily changed to work?

  27. Richard says:

    Just installed this for a client and got the same errors as reported by Adrian and Clay (global $blog not being an object).

    I was able to fix it easily by replacing all instances of global $blog with global $blog_id and then $blog->userblog_id with $blog_id. $blog_id is a global variable as per http://codex.wordpress.org/Global_Variables so I hope this should work for you!

  28. Rob says:

    Hello Kim,

    I'd like to redirect my subscribers to the homepage of the site instead of their profile page. Can you please share which line of the plugin.php I have to change to achieve this and to what?

Comments are closed.