Support » Plugin: Share Buttons by AddThis » show dashboard widget to editors too

  • 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/

Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
  • The topic ‘show dashboard widget to editors too’ is closed to new replies.