define3d
Forum Replies Created
-
Forum: Plugins
In reply to: [Download Monitor] [Plugin: WordPress Download Monitor] Hide Dashboard WidgetI’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’ );
}
?>🙂
Forum: Fixing WordPress
In reply to: [wordTube] [Plugin: wordTube] Hide Dashboard WidgetI’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’][‘wt_dashboard_statistics’]);
}
if (!current_user_can(‘manage_options’)) {
add_action(‘wp_dashboard_setup’, ‘remove_dashboard_widgets’ );
}
?>🙂
Forum: Plugins
In reply to: [wordTube] [Plugin: wordTube] Wordtube – Hide from DashboardYou need to add following lines to your functions.php file –>
function remove_dashboard_widgets() {
global $wp_meta_boxes;
unset($wp_meta_boxes[‘dashboard’][‘normal’][‘core’][‘wt_dashboard_statistics’]);
}
if (!current_user_can(‘manage_options’)) {
add_action(‘wp_dashboard_setup’, ‘remove_dashboard_widgets’ );
}
?>Hope that helps 🙂