WordPress.org

Ready to get started?Download WordPress

Forums

wpMandrill
[resolved] Dashboard Widget (17 posts)

  1. Austin Passy
    Member
    Posted 1 year ago #

    Would like to see the dashboard widget only available to user who 'manage_options' at the very least.

    I don't need my customers to see my email statistics.

    http://wordpress.org/extend/plugins/wpmandrill/

  2. Austin Passy
    Member
    Posted 1 year ago #

    For the time being I have implemented this code in my core plugin:

    function extendd_dot_com_remove_wpmandrill_dashboard() {
    	if ( class_exists( 'wpMandrill' ) ) {
    		remove_action( 'wp_dashboard_setup', array( 'wpMandrill' , 'addDashboardWidgets' ) );
    		if ( current_user_can( 'manage_options' ) ) {
    			add_action( 'wp_dashboard_setup', array( 'wpMandrill' , 'addDashboardWidgets' ) );
    		}
    	}
    }
    add_action( 'admin_init', 'extendd_dot_com_remove_wpmandrill_dashboard' );
    

    It removed the dashboard widget for users that can't manage_options

  3. willcast
    Member
    Posted 1 year ago #

    Hey.

    Thanks for the suggestion. That will be included in the next release.

  4. baritoneuk
    Member
    Posted 1 year ago #

    I am a bit of a minimalist, so I'd love the option of whether or not to show the dashboard widget. Would this be possible to add in WPMandrill settings?

  5. Austin Passy
    Member
    Posted 1 year ago #

    @baritoneuk Go up to your screen options and unckeck Mandrill.

  6. baritoneuk
    Member
    Posted 1 year ago #

    Screen options only gets rid of the dashboard for the current user. When I build WordPress websites for clients I want to make sure the dashboard is as free as possible from clutter. The majority in fact probably all of our clients aren't going to want to see the Mandrill dashboard widget. The problem with the screen options feature in WordPress is that it relies on the user knowing that it exists and then deselecting the widgets.

    My view is that plugins should always have an option as to whether you want the dashboard widget displayed or not. I'm glad to see that Yoast saw the light last year- http://yoast.com/wordpress-dashboard-widgets/

  7. Austin Passy
    Member
    Posted 1 year ago #

    Use my function above to remove it.

  8. baritoneuk
    Member
    Posted 1 year ago #

    Ah, just realised it was you who provided the code and I had forgotten to thank you!

    I added the code yesterday and my dashboard has been returned to blissful minimalism! :-)

  9. baritoneuk
    Member
    Posted 1 year ago #

    Still forgot to thank you...

    Thanks!

  10. Austin Passy
    Member
    Posted 1 year ago #

    :)

  11. Ovidiu
    Member
    Posted 1 year ago #

    Would it be possible to restrict the widget to only show stats for the API key used on that blog and not for the whole Mandrill account?

  12. MC_Will
    Member
    Plugin Author

    Posted 1 year ago #

    @Ovidiu: Sorry, It's not possible at the moment.

  13. baritoneuk
    Member
    Posted 1 year ago #

    @MC_Will - any thoughts on making the dashboard widget optional or at least having an option to switch it off?

  14. MC_Will
    Member
    Plugin Author

    Posted 1 year ago #

    Yes Sir!

    In the meantime you can use Austin's hack.

  15. Ovidiu
    Member
    Posted 1 year ago #

    @MC_Will: so I'll have to create an account for each WP site I manage? I thought I'd use one Mandrill account for all and then probably have to upgrade from the free service to the paid tier.
    So do you plan on making this option available sometime in the future or do you suggest I go and get a Mandrill account for each site?

  16. MC_Will
    Member
    Plugin Author

    Posted 1 year ago #

    Right now, there's no way we can filter by API key, not in the plugin but in our API.

    I've added this request to our road map but I don't know if it will be available anytime soon.

    I'll keep this thread updated.

  17. Ovidiu
    Member
    Posted 1 year ago #

    thx, will keep an eye on this thread.

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic