Support » Plugin: WP-Click-Tracker » [Plugin: WP-Click-Tracker] If you want only editors/admins to see dashboard statistics

  • maxemil

    (@maxemil)


    Note, this was done to Version 0.7.3.
    It really should be implemented to the plugin itself with an options panel 🙂 – this is just a quick fix.

    Someone asked that subscribers/authors dont see the dashboard statistics.
    heres a way to disable the dashboard for non editors/admins:

    Edit the file “click-tracker.php”

    1: find the line
    “add_action(‘wp_dashboard_setup’, ‘wpct_admin_add_dashboard_widgets’ );”

    2: insert two // before the line (making it not execute)

    3: paste the following code

    function wpct_admin_add_dashboard_widgets2()
    {
      if ( current_user_can('level_7') ) // editors and admins
      {
        wp_add_dashboard_widget('wpct_admin_dashboard_widget', __('Click Tracker', 'wp-click-track'), 'wpct_admin_dashboard_widget');
      }
    }
    add_action('wp_dashboard_setup', 'wpct_admin_add_dashboard_widgets2');

    Note that the last line is almost identical as the one you //’ed
    – The only thing we do here is to insert a check if the user is editor or admin.

    BR\Emil

    http://wordpress.org/extend/plugins/wp-click-track/

Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
  • The topic ‘[Plugin: WP-Click-Tracker] If you want only editors/admins to see dashboard statistics’ is closed to new replies.