Make WordPress Core


Ignore:
Timestamp:
11/02/2011 08:14:10 PM (13 years ago)
Author:
nacin
Message:

s/add_help_sidebar/set_help_sidebar/g and introduce screen->remove_help_tab($id) and screen->remove_help_tabs(). see #19020, #18785.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-admin/includes/screen.php

    r19113 r19119  
    154154        return;
    155155
    156     return $current_screen->add_option( $option, $args );
     156    $current_screen->add_option( $option, $args );
    157157}
    158158
     
    598598    /**
    599599     * Add a help tab to the contextual help for the screen.
    600      * Call this in template files after admin.php is loaded and before admin-header.php is loaded to add contextual help tabs.
     600     * Call this on the load-$pagenow hook for the relevant screen.
    601601     *
    602602     * @since 3.3.0
     
    628628
    629629    /**
     630     * Removes a help tab from the contextual help for the screen.
     631     *
     632     * @since 3.3.0
     633     *
     634     * @param string $id The help tab ID.
     635     */
     636    public function remove_help_tab( $id ) {
     637        unset( $this->_help_tabs[ $id ] );
     638    }
     639
     640    /**
     641     * Removes all help tabs from the contextual help for the screen.
     642     *
     643     * @since 3.3.0
     644     */
     645    public function remove_help_tabs() {
     646        $this->_help_tabs = array();
     647    }
     648
     649    /**
    630650     * Add a sidebar to the contextual help for the screen.
    631651     * Call this in template files after admin.php is loaded and before admin-header.php is loaded to add a sidebar to the contextual help.
     
    635655     * @param string $content Sidebar content in plain text or HTML.
    636656     */
    637     public function add_help_sidebar( $content ) {
     657    public function set_help_sidebar( $content ) {
    638658        $this->_help_sidebar = $content;
    639659    }
Note: See TracChangeset for help on using the changeset viewer.