WordPress.org

Ready to get started?Download WordPress

Forums

Smart Website Tools by AddThis
show dashboard widget to editors too (2 posts)

  1. maxgx
    Member
    Posted 1 year 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 1 year ago #

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

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic