Make WordPress Core

Changeset 52035


Ignore:
Timestamp:
11/08/2021 10:47:55 AM (3 years ago)
Author:
johnbillion
Message:

Docs: Various docblock improvements and corrections.

See #53399

Location:
trunk
Files:
5 edited

Legend:

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

    r51827 r52035  
    164164 * @see register_setting()
    165165 *
    166  * @param string $option_group A settings group name. Should correspond to an allowed option key name.
    167  *                             Default allowed option key names include 'general', 'discussion', 'media',
    168  *                             'reading', 'writing', and 'options'.
    169  * @param string $option_name The name of an option to sanitize and save.
    170  * @param callable $sanitize_callback A callback function that sanitizes the option's value.
     166 * @param string   $option_group      A settings group name. Should correspond to an allowed option key name.
     167 *                                    Default allowed option key names include 'general', 'discussion', 'media',
     168 *                                    'reading', 'writing', and 'options'.
     169 * @param string   $option_name      The name of an option to sanitize and save.
     170 * @param callable $sanitize_callback Optional. A callback function that sanitizes the option's value.
    171171 */
    172172function add_option_update_handler( $option_group, $option_name, $sanitize_callback = '' ) {
     
    182182 * @see unregister_setting()
    183183 *
    184  * @param string $option_group
    185  * @param string $option_name
    186  * @param callable $sanitize_callback
     184 * @param string   $option_group      The settings group name used during registration.
     185 * @param string   $option_name       The name of the option to unregister.
     186 * @param callable $sanitize_callback Optional. Deprecated.
    187187 */
    188188function remove_option_update_handler( $option_group, $option_name, $sanitize_callback = '' ) {
     
    14271427 * @param string   $capability The capability required for this menu to be displayed to the user.
    14281428 * @param string   $menu_slug  The slug name to refer to this menu by (should be unique for this menu).
    1429  * @param callable $function   The function to be called to output the content for this page.
    1430  * @param string   $icon_url   The url to the icon to be used for this menu.
     1429 * @param callable $function   Optional. The function to be called to output the content for this page.
     1430 * @param string   $icon_url   Optional. The URL to the icon to be used for this menu.
    14311431 * @return string The resulting page's hook_suffix.
    14321432 */
     
    14601460 * @param string   $capability The capability required for this menu to be displayed to the user.
    14611461 * @param string   $menu_slug  The slug name to refer to this menu by (should be unique for this menu).
    1462  * @param callable $function   The function to be called to output the content for this page.
    1463  * @param string   $icon_url   The url to the icon to be used for this menu.
     1462 * @param callable $function   Optional. The function to be called to output the content for this page.
     1463 * @param string   $icon_url   Optional. The URL to the icon to be used for this menu.
    14641464 * @return string The resulting page's hook_suffix.
    14651465 */
  • trunk/src/wp-admin/includes/plugin.php

    r51955 r52035  
    13001300 *                             include lowercase alphanumeric, dashes, and underscores characters to be compatible
    13011301 *                             with sanitize_key().
    1302  * @param callable $function   The function to be called to output the content for this page.
    1303  * @param string   $icon_url   The URL to the icon to be used for this menu.
     1302 * @param callable $function   Optional. The function to be called to output the content for this page.
     1303 * @param string   $icon_url   Optional. The URL to the icon to be used for this menu.
    13041304 *                             * Pass a base64-encoded SVG using a data URI, which will be colored to match
    13051305 *                               the color scheme. This should begin with 'data:image/svg+xml;base64,'.
     
    13071307 *                               e.g. 'dashicons-chart-pie'.
    13081308 *                             * Pass 'none' to leave div.wp-menu-image empty so an icon can be added via CSS.
    1309  * @param int      $position   The position in the menu order this item should appear.
     1309 * @param int      $position   Optional. The position in the menu order this item should appear.
    13101310 * @return string The resulting page's hook_suffix.
    13111311 */
     
    13781378 *                              and only include lowercase alphanumeric, dashes, and underscores characters
    13791379 *                              to be compatible with sanitize_key().
    1380  * @param callable $function    The function to be called to output the content for this page.
    1381  * @param int      $position    The position in the menu order this item should appear.
     1380 * @param callable $function    Optional. The function to be called to output the content for this page.
     1381 * @param int      $position    Optional. The position in the menu order this item should appear.
    13821382 * @return string|false The resulting page's hook_suffix, or false if the user does not have the capability required.
    13831383 */
     
    14901490 * @param string   $capability The capability required for this menu to be displayed to the user.
    14911491 * @param string   $menu_slug  The slug name to refer to this menu by (should be unique for this menu).
    1492  * @param callable $function   The function to be called to output the content for this page.
    1493  * @param int      $position   The position in the menu order this item should appear.
     1492 * @param callable $function   Optional. The function to be called to output the content for this page.
     1493 * @param int      $position   Optional. The position in the menu order this item should appear.
    14941494 * @return string|false The resulting page's hook_suffix, or false if the user does not have the capability required.
    14951495 */
     
    15141514 * @param string   $capability The capability required for this menu to be displayed to the user.
    15151515 * @param string   $menu_slug  The slug name to refer to this menu by (should be unique for this menu).
    1516  * @param callable $function   The function to be called to output the content for this page.
    1517  * @param int      $position   The position in the menu order this item should appear.
     1516 * @param callable $function   Optional. The function to be called to output the content for this page.
     1517 * @param int      $position   Optional. The position in the menu order this item should appear.
    15181518 * @return string|false The resulting page's hook_suffix, or false if the user does not have the capability required.
    15191519 */
     
    15381538 * @param string   $capability The capability required for this menu to be displayed to the user.
    15391539 * @param string   $menu_slug  The slug name to refer to this menu by (should be unique for this menu).
    1540  * @param callable $function   The function to be called to output the content for this page.
    1541  * @param int      $position   The position in the menu order this item should appear.
     1540 * @param callable $function   Optional. The function to be called to output the content for this page.
     1541 * @param int      $position   Optional. The position in the menu order this item should appear.
    15421542 * @return string|false The resulting page's hook_suffix, or false if the user does not have the capability required.
    15431543 */
     
    15621562 * @param string   $capability The capability required for this menu to be displayed to the user.
    15631563 * @param string   $menu_slug  The slug name to refer to this menu by (should be unique for this menu).
    1564  * @param callable $function   The function to be called to output the content for this page.
    1565  * @param int      $position   The position in the menu order this item should appear.
     1564 * @param callable $function   Optional. The function to be called to output the content for this page.
     1565 * @param int      $position   Optional. The position in the menu order this item should appear.
    15661566 * @return string|false The resulting page's hook_suffix, or false if the user does not have the capability required.
    15671567 */
     
    15861586 * @param string   $capability The capability required for this menu to be displayed to the user.
    15871587 * @param string   $menu_slug  The slug name to refer to this menu by (should be unique for this menu).
    1588  * @param callable $function   The function to be called to output the content for this page.
    1589  * @param int      $position   The position in the menu order this item should appear.
     1588 * @param callable $function   Optional. The function to be called to output the content for this page.
     1589 * @param int      $position   Optional. The position in the menu order this item should appear.
    15901590 * @return string|false The resulting page's hook_suffix, or false if the user does not have the capability required.
    15911591 */
     
    16151615 * @param string   $capability The capability required for this menu to be displayed to the user.
    16161616 * @param string   $menu_slug  The slug name to refer to this menu by (should be unique for this menu).
    1617  * @param callable $function   The function to be called to output the content for this page.
    1618  * @param int      $position   The position in the menu order this item should appear.
     1617 * @param callable $function   Optional. The function to be called to output the content for this page.
     1618 * @param int      $position   Optional. The position in the menu order this item should appear.
    16191619 * @return string|false The resulting page's hook_suffix, or false if the user does not have the capability required.
    16201620 */
     
    16391639 * @param string   $capability The capability required for this menu to be displayed to the user.
    16401640 * @param string   $menu_slug  The slug name to refer to this menu by (should be unique for this menu).
    1641  * @param callable $function   The function to be called to output the content for this page.
    1642  * @param int      $position   The position in the menu order this item should appear.
     1641 * @param callable $function   Optional. The function to be called to output the content for this page.
     1642 * @param int      $position   Optional. The position in the menu order this item should appear.
    16431643 * @return string|false The resulting page's hook_suffix, or false if the user does not have the capability required.
    16441644 */
     
    16631663 * @param string   $capability The capability required for this menu to be displayed to the user.
    16641664 * @param string   $menu_slug  The slug name to refer to this menu by (should be unique for this menu).
    1665  * @param callable $function   The function to be called to output the content for this page.
    1666  * @param int      $position   The position in the menu order this item should appear.
     1665 * @param callable $function   Optional. The function to be called to output the content for this page.
     1666 * @param int      $position   Optional. The position in the menu order this item should appear.
    16671667 * @return string|false The resulting page's hook_suffix, or false if the user does not have the capability required.
    16681668 */
     
    16871687 * @param string   $capability The capability required for this menu to be displayed to the user.
    16881688 * @param string   $menu_slug  The slug name to refer to this menu by (should be unique for this menu).
    1689  * @param callable $function   The function to be called to output the content for this page.
    1690  * @param int      $position   The position in the menu order this item should appear.
     1689 * @param callable $function   Optional. The function to be called to output the content for this page.
     1690 * @param int      $position   Optional. The position in the menu order this item should appear.
    16911691 * @return string|false The resulting page's hook_suffix, or false if the user does not have the capability required.
    16921692 */
     
    17111711 * @param string   $capability The capability required for this menu to be displayed to the user.
    17121712 * @param string   $menu_slug  The slug name to refer to this menu by (should be unique for this menu).
    1713  * @param callable $function   The function to be called to output the content for this page.
    1714  * @param int      $position   The position in the menu order this item should appear.
     1713 * @param callable $function   Optional. The function to be called to output the content for this page.
     1714 * @param int      $position   Optional. The position in the menu order this item should appear.
    17151715 * @return string|false The resulting page's hook_suffix, or false if the user does not have the capability required.
    17161716 */
     
    17351735 * @param string   $capability The capability required for this menu to be displayed to the user.
    17361736 * @param string   $menu_slug  The slug name to refer to this menu by (should be unique for this menu).
    1737  * @param callable $function   The function to be called to output the content for this page.
    1738  * @param int      $position   The position in the menu order this item should appear.
     1737 * @param callable $function   Optional. The function to be called to output the content for this page.
     1738 * @param int      $position   Optional. The position in the menu order this item should appear.
    17391739 * @return string|false The resulting page's hook_suffix, or false if the user does not have the capability required.
    17401740 */
  • trunk/src/wp-includes/formatting.php

    r51984 r52035  
    50305030 * @since 2.3.0
    50315031 *
    5032  * @param array $matches Populated by matches to preg_replace.
     5032 * @param string[] $matches Populated by matches to preg_replace.
    50335033 * @return string The text returned after esc_html if needed.
    50345034 */
  • trunk/src/wp-includes/option.php

    r51832 r52035  
    23842384 * @global array $wp_registered_settings
    23852385 *
    2386  * @param string          $option_group The settings group name used during registration.
    2387  * @param string          $option_name  The name of the option to unregister.
    2388  * @param callable|string $deprecated  Deprecated.
     2386 * @param string   $option_group The settings group name used during registration.
     2387 * @param string   $option_name  The name of the option to unregister.
     2388 * @param callable $deprecated   Optional. Deprecated.
    23892389 */
    23902390function unregister_setting( $option_group, $option_name, $deprecated = '' ) {
  • trunk/tests/phpunit/includes/testcase-xmlrpc.php

    r52009 r52035  
    55
    66abstract class WP_XMLRPC_UnitTestCase extends WP_UnitTestCase {
     7    /**
     8     * @var wp_xmlrpc_server
     9     */
    710    protected $myxmlrpcserver;
    811
Note: See TracChangeset for help on using the changeset viewer.