WordPress.org

Ready to get started?Download WordPress

Forums

Share Buttons by AddThis
show dashboard widget to editors too (2 posts)

  1. maxgx
    Member
    Posted 10 months ago #

    sometimes it's important to show stats to editors too (usually the role with enough priviledges to give a client), but there's no option in settings to select a minimum role to show the dashboard widget to.
    i hope that can be considered for the next release, so one doesn't have to resort to hack the code.

    i had to manually hack the addthis_social_widget.php file to achieve this:

    around line 503 changed:
    if( current_user_can('manage_options') || apply_filters('addthis_show_dashboard', __return_false() ) )
    to:
    if( current_user_can('manage_categories') || apply_filters('addthis_show_dashboard', __return_false() ) )

    and around line 802 changed:
    if (isset($options['addthis_show_stats']) && $options['addthis_show_stats'] == true && isset($options['username']) && isset($options['password']) && ! empty($options['username']) && ! empty($options['password']) && (current_user_can('manage_options') || apply_filters('addthis_show_dashboard', __return_false() ) ) )
    to:
    if (isset($options['addthis_show_stats']) && $options['addthis_show_stats'] == true && isset($options['username']) && isset($options['password']) && ! empty($options['username']) && ! empty($options['password']) && (current_user_can('manage_categories') || apply_filters('addthis_show_dashboard', __return_false() ) ) )

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

  2. srijith.v
    AddThis Samurai
    Plugin Author

    Posted 10 months ago #

    @maxgx Thanks for the suggestion. We will review and add the feature in one of our upcoming release.

Reply

You must log in to post.

About this Plugin

About this Topic