WordPress.org

Make WordPress Core


Ignore:
Timestamp:
01/11/2020 06:30:58 PM (13 months ago)
Author:
SergeyBiryukov
Message:

Docs: In various @return tags, list the expected type first, instead of false.

Follow-up to [46696].

See #48303.

File:
1 edited

Legend:

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

    r47006 r47060  
    614614 *                             or just the current site. Multisite only. Default false.
    615615 * @param bool   $silent       Optional. Whether to prevent calling activation hooks. Default false.
    616  * @return null|WP_Error WP_Error on invalid file or null on success.
     616 * @return null|WP_Error Null on success, WP_Error on invalid file.
    617617 */
    618618function activate_plugin( $plugin, $redirect = '', $network_wide = false, $silent = false ) {
     
    13431343 * @param callable $function    The function to be called to output the content for this page.
    13441344 * @param int      $position    The position in the menu order this item should appear.
    1345  * @return false|string The resulting page's hook_suffix, or false if the user does not have the capability required.
     1345 * @return string|false The resulting page's hook_suffix, or false if the user does not have the capability required.
    13461346 */
    13471347function add_submenu_page( $parent_slug, $page_title, $menu_title, $capability, $menu_slug, $function = '', $position = null ) {
     
    14551455 * @param callable $function   The function to be called to output the content for this page.
    14561456 * @param int      $position   The position in the menu order this item should appear.
    1457  * @return false|string The resulting page's hook_suffix, or false if the user does not have the capability required.
     1457 * @return string|false The resulting page's hook_suffix, or false if the user does not have the capability required.
    14581458 */
    14591459function add_management_page( $page_title, $menu_title, $capability, $menu_slug, $function = '', $position = null ) {
     
    14791479 * @param callable $function   The function to be called to output the content for this page.
    14801480 * @param int      $position   The position in the menu order this item should appear.
    1481  * @return false|string The resulting page's hook_suffix, or false if the user does not have the capability required.
     1481 * @return string|false The resulting page's hook_suffix, or false if the user does not have the capability required.
    14821482 */
    14831483function add_options_page( $page_title, $menu_title, $capability, $menu_slug, $function = '', $position = null ) {
     
    15031503 * @param callable $function   The function to be called to output the content for this page.
    15041504 * @param int      $position   The position in the menu order this item should appear.
    1505  * @return false|string The resulting page's hook_suffix, or false if the user does not have the capability required.
     1505 * @return string|false The resulting page's hook_suffix, or false if the user does not have the capability required.
    15061506 */
    15071507function add_theme_page( $page_title, $menu_title, $capability, $menu_slug, $function = '', $position = null ) {
     
    15271527 * @param callable $function   The function to be called to output the content for this page.
    15281528 * @param int      $position   The position in the menu order this item should appear.
    1529  * @return false|string The resulting page's hook_suffix, or false if the user does not have the capability required.
     1529 * @return string|false The resulting page's hook_suffix, or false if the user does not have the capability required.
    15301530 */
    15311531function add_plugins_page( $page_title, $menu_title, $capability, $menu_slug, $function = '', $position = null ) {
     
    15511551 * @param callable $function   The function to be called to output the content for this page.
    15521552 * @param int      $position   The position in the menu order this item should appear.
    1553  * @return false|string The resulting page's hook_suffix, or false if the user does not have the capability required.
     1553 * @return string|false The resulting page's hook_suffix, or false if the user does not have the capability required.
    15541554 */
    15551555function add_users_page( $page_title, $menu_title, $capability, $menu_slug, $function = '', $position = null ) {
     
    15801580 * @param callable $function   The function to be called to output the content for this page.
    15811581 * @param int      $position   The position in the menu order this item should appear.
    1582  * @return false|string The resulting page's hook_suffix, or false if the user does not have the capability required.
     1582 * @return string|false The resulting page's hook_suffix, or false if the user does not have the capability required.
    15831583 */
    15841584function add_dashboard_page( $page_title, $menu_title, $capability, $menu_slug, $function = '', $position = null ) {
     
    16041604 * @param callable $function   The function to be called to output the content for this page.
    16051605 * @param int      $position   The position in the menu order this item should appear.
    1606  * @return false|string The resulting page's hook_suffix, or false if the user does not have the capability required.
     1606 * @return string|false The resulting page's hook_suffix, or false if the user does not have the capability required.
    16071607 */
    16081608function add_posts_page( $page_title, $menu_title, $capability, $menu_slug, $function = '', $position = null ) {
     
    16281628 * @param callable $function   The function to be called to output the content for this page.
    16291629 * @param int      $position   The position in the menu order this item should appear.
    1630  * @return false|string The resulting page's hook_suffix, or false if the user does not have the capability required.
     1630 * @return string|false The resulting page's hook_suffix, or false if the user does not have the capability required.
    16311631 */
    16321632function add_media_page( $page_title, $menu_title, $capability, $menu_slug, $function = '', $position = null ) {
     
    16521652 * @param callable $function   The function to be called to output the content for this page.
    16531653 * @param int      $position   The position in the menu order this item should appear.
    1654  * @return false|string The resulting page's hook_suffix, or false if the user does not have the capability required.
     1654 * @return string|false The resulting page's hook_suffix, or false if the user does not have the capability required.
    16551655 */
    16561656function add_links_page( $page_title, $menu_title, $capability, $menu_slug, $function = '', $position = null ) {
     
    16761676 * @param callable $function   The function to be called to output the content for this page.
    16771677 * @param int      $position   The position in the menu order this item should appear.
    1678  * @return false|string The resulting page's hook_suffix, or false if the user does not have the capability required.
     1678 * @return string|false The resulting page's hook_suffix, or false if the user does not have the capability required.
    16791679 */
    16801680function add_pages_page( $page_title, $menu_title, $capability, $menu_slug, $function = '', $position = null ) {
     
    17001700 * @param callable $function   The function to be called to output the content for this page.
    17011701 * @param int      $position   The position in the menu order this item should appear.
    1702  * @return false|string The resulting page's hook_suffix, or false if the user does not have the capability required.
     1702 * @return string|false The resulting page's hook_suffix, or false if the user does not have the capability required.
    17031703 */
    17041704function add_comments_page( $page_title, $menu_title, $capability, $menu_slug, $function = '', $position = null ) {
Note: See TracChangeset for help on using the changeset viewer.