Make WordPress Core

Changeset 45085


Ignore:
Timestamp:
04/01/2019 02:08:01 PM (6 years ago)
Author:
SergeyBiryukov
Message:

Docs: Improve documentation for get_plugin_page_hook() and get_plugin_page_hookname().

Props subrataemfluence, desrosj.
Fixes #44224.

File:
1 edited

Legend:

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

    r44981 r45085  
    13551355
    13561356    /*
    1357      * Backward-compatibility for plugins using add_management page.
    1358      * See wp-admin/admin.php for redirect from edit.php to tools.php
     1357     * Backward-compatibility for plugins using add_management_page().
     1358     * See wp-admin/admin.php for redirect from edit.php to tools.php.
    13591359     */
    13601360    if ( 'tools.php' == $parent_slug ) {
     
    17141714 * @global array $_wp_menu_nopriv
    17151715 * @global array $_wp_submenu_nopriv
     1716 *
     1717 * @return string
    17161718 */
    17171719function get_admin_page_parent( $parent = '' ) {
     
    17841786 * @global string $plugin_page
    17851787 * @global string $typenow
     1788 *
     1789 * @return string
    17861790 */
    17871791function get_admin_page_title() {
     
    18601864 * @since 2.3.0
    18611865 *
    1862  * @param string $plugin_page
    1863  * @param string $parent_page
    1864  * @return string|null
     1866 * @param string $plugin_page The slug name of the plugin page.
     1867 * @param string $parent_page The slug name for the parent menu (or the file name of a standard
     1868 *                            WordPress admin page).
     1869 * @return string|null Hook attached to the plugin page, null otherwise.
    18651870 */
    18661871function get_plugin_page_hook( $plugin_page, $parent_page ) {
     
    18751880/**
    18761881 * @global array $admin_page_hooks
    1877  * @param string $plugin_page
    1878  * @param string $parent_page
     1882 *
     1883 * @param string $plugin_page The slug name of the plugin page.
     1884 * @param string $parent_page The slug name for the parent menu (or the file name of a standard
     1885 *                            WordPress admin page).
     1886 * @return string Hook name for the plugin page.
    18791887 */
    18801888function get_plugin_page_hookname( $plugin_page, $parent_page ) {
     
    19071915 * @global string $plugin_page
    19081916 * @global array $_registered_pages
     1917 *
     1918 * @return bool Whether the current user can access the current admin page.
    19091919 */
    19101920function user_can_access_admin_page() {
Note: See TracChangeset for help on using the changeset viewer.