Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Remove help and screen context and options
<?php
// Remove help and screen context:
// Remove Help and Screen Options
// http://wordpress.stackexchange.com/questions/73561/how-to-remove-all-widgets-from-dashboard
add_filter( 'contextual_help', 'wpse_25034_remove_dashboard_help_tab', 999, 3 );
add_filter( 'screen_options_show_screen', 'wpse_25034_remove_help_tab' );
function wpse_25034_remove_dashboard_help_tab( $old_help, $screen_id, $screen )
{
if( 'dashboard' != $screen->base )
return $old_help;
$screen->remove_help_tabs();
return $old_help;
}
function wpse_25034_remove_help_tab( $visible )
{
global $current_screen;
if( 'dashboard' == $current_screen->base )
return false;
return $visible;
}
?>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.