Remove Help tabs on wordpress

is there any way to remove the help tabs on wordpress ?
I’m looking to remove these tabs not to hide them with css.

On the wp-admin/includes/screen.php there are a couple of lines that mention this but no idea how to create something to remove the help tab.

Read More

Is any way to create something similar to: add_filter('screen_options_show_screen', '__return_false'); but to remove the Help tab ?

From the screen.php file:

647      /**
 648       * Removes a help tab from the contextual help for the screen.
 649       *
 650       * @since 3.3.0
 651       *
 652       * @param string $id The help tab ID.
 653       */
 654    public function remove_help_tab( $id ) {
 655          unset( $this->_help_tabs[ $id ] );
 656      }
 657  
 658      /**
 659       * Removes all help tabs from the contextual help for the screen.
 660       *
 661       * @since 3.3.0
 662       */
 663    public function remove_help_tabs() {
 664          $this->_help_tabs = array();
 665      }

Related posts

Leave a Reply

1 comment

  1. You need to use the contextual_help help filter.

    add_filter( 'contextual_help', 'wpse50723_remove_help', 999, 3 );
    function wpse50723_remove_help($old_help, $screen_id, $screen){
        $screen->remove_help_tabs();
        return $old_help;
    }
    

    The filter is for the old context help (pre 3.3). (I’m not sure it matters what is returned…?).

    In any case the filter should be called late (hence 999) because plug-ins could add their own help tabs to pages. This is partly why admin_head is not an ideal hook.

    Also this will work as well

    add_action('admin_head', 'mytheme_remove_help_tabs');
    function mytheme_remove_help_tabs() {
        $screen = get_current_screen();
        $screen->remove_help_tabs();
    }
    

    But the first option is the safe one