WordPress.org

Support

Support » Plugins and Hacks » [Resolved] [Plugin: WordPress Download Monitor] Hide Dashboard Widget

[Resolved] [Plugin: WordPress Download Monitor] Hide Dashboard Widget

  • define3d
    Member

    @define3d

    Hello there,
    Thanks for this wonderful plugin.
    I want to remove the dashboard widget for all of my site users except the admin. I can remove default wordpress widgets on my dashboard but i’ve no idea how to hide download stats and top 5 downloads from dashboard.

    hope to hear shortly on this..
    Thanks

Viewing 1 replies (of 1 total)
  • define3d
    Member

    @define3d

    I’ve figured it out. We need to add following lines to the functions.php file –>

    function remove_dashboard_widgets() {

    global $wp_meta_boxes;

    unset($wp_meta_boxes[‘dashboard’][‘normal’][‘core’][‘dlm_download_stats_widget’]);
    unset($wp_meta_boxes[‘dashboard’][‘normal’][‘core’][‘dlm_download_top_widget’]);

    }

    if (!current_user_can(‘manage_options’)) {
    add_action(‘wp_dashboard_setup’, ‘remove_dashboard_widgets’ );
    }
    ?>

    🙂

Viewing 1 replies (of 1 total)
  • The topic ‘[Resolved] [Plugin: WordPress Download Monitor] Hide Dashboard Widget’ is closed to new replies.