Make WordPress Core

Changeset 46590


Ignore:
Timestamp:
10/26/2019 12:32:20 AM (5 years ago)
Author:
SergeyBiryukov
Message:

Docs: Improve documentation for WP_Screen::add_help_tab().

Props atachibana.
Fixes #48395.

File:
1 edited

Legend:

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

    r45932 r46590  
    595595    /**
    596596     * Add a help tab to the contextual help for the screen.
    597      * Call this on the load-$pagenow hook for the relevant screen.
     597     *
     598     * Call this on the `load-$pagenow` hook for the relevant screen,
     599     * or fetch the `$current_screen` object, or use get_current_screen()
     600     * and then call the method from the object.
     601     *
     602     * You may need to filter `$current_screen` using an if or switch statement
     603     * to prevent new help tabs from being added to ALL admin screens.
    598604     *
    599605     * @since 3.3.0
     
    604610     *
    605611     *     @type string $title    Title for the tab. Default false.
    606      *     @type string $id       Tab ID. Must be HTML-safe. Default false.
     612     *     @type string $id       Tab ID. Must be HTML-safe and should be unique for this menu.
     613     *                            It is NOT allowed to contain any empty spaces. Default false.
    607614     *     @type string $content  Optional. Help tab content in plain text or HTML. Default empty string.
    608615     *     @type string $callback Optional. A callback to generate the tab content. Default false.
Note: See TracChangeset for help on using the changeset viewer.