WordPress.org

Make WordPress Core

Ticket #47678: 47678-docs-add-changelog-since-tags.patch

File 47678-docs-add-changelog-since-tags.patch, 16.2 KB (added by jrf, 9 months ago)

Documentation only patch: add @since changelog entries about the function signature changes

  • src/wp-admin/includes/class-wp-ajax-upgrader-skin.php

    From b80d3cb080d1678cd2cd34b17b3206c64ee1eeaf Mon Sep 17 00:00:00 2001
    From: jrfnl <jrfnl@users.noreply.github.com>
    Date: Wed, 9 Oct 2019 01:48:53 +0200
    Subject: [PATCH] Documentation: add @since changelog entries about the
     function signature changes
    
    ---
     src/wp-admin/includes/class-wp-ajax-upgrader-skin.php |  4 ++++
     src/wp-admin/includes/dashboard.php                   |  2 ++
     src/wp-admin/includes/media.php                       |  2 ++
     src/wp-includes/capabilities.php                      | 10 ++++++++++
     src/wp-includes/category-template.php                 | 10 ++++++++--
     src/wp-includes/class-wp-dependency.php               |  2 ++
     src/wp-includes/class-wp-user.php                     |  2 ++
     src/wp-includes/class-wp-walker.php                   |  4 ++++
     src/wp-includes/formatting.php                        |  3 +++
     src/wp-includes/functions.php                         |  2 ++
     src/wp-includes/plugin.php                            |  2 ++
     src/wp-includes/post-template.php                     |  5 ++++-
     src/wp-includes/post.php                              |  2 ++
     src/wp-includes/theme.php                             |  6 ++++++
     src/wp-includes/widgets.php                           |  8 ++++++++
     src/wp-includes/wp-db.php                             |  3 +++
     tests/phpunit/includes/abstract-testcase.php          |  2 ++
     17 files changed, 66 insertions(+), 3 deletions(-)
    
    diff --git a/src/wp-admin/includes/class-wp-ajax-upgrader-skin.php b/src/wp-admin/includes/class-wp-ajax-upgrader-skin.php
    index b19e573fb8..75ba62fafc 100644
    a b class WP_Ajax_Upgrader_Skin extends Automatic_Upgrader_Skin { 
    7777         * Stores a log entry for an error.
    7878         *
    7979         * @since 4.6.0
     80         * @since 5.3.0 Formalized the existing ...$args parameter by adding it
     81         *              to the function signature.
    8082         *
    8183         * @param string|WP_Error $errors  Errors.
    8284         * @param mixed           ...$args Optional text replacements.
    class WP_Ajax_Upgrader_Skin extends Automatic_Upgrader_Skin { 
    110112         * Stores a log entry.
    111113         *
    112114         * @since 4.6.0
     115         * @since 5.3.0 Formalized the existing ...$args parameter by adding it
     116         *              to the function signature.
    113117         *
    114118         * @param string|array|WP_Error $data    Log entry data.
    115119         * @param mixed                 ...$args Optional text replacements.
  • src/wp-admin/includes/dashboard.php

    diff --git a/src/wp-admin/includes/dashboard.php b/src/wp-admin/includes/dashboard.php
    index eb9b86d468..b1090fdc21 100644
    a b function wp_dashboard_rss_output( $widget_id ) { 
    10551055 * which is later replaced by Ajax call (see top of /wp-admin/index.php)
    10561056 *
    10571057 * @since 2.5.0
     1058 * @since 5.3.0 Formalized the existing and already documented ...$args parameter
     1059 *              by adding it to the function signature.
    10581060 *
    10591061 * @param string   $widget_id  The widget ID.
    10601062 * @param callable $callback   The callback funtion used to display each feed.
  • src/wp-admin/includes/media.php

    diff --git a/src/wp-admin/includes/media.php b/src/wp-admin/includes/media.php
    index b9e9acc99d..f67cc83725 100644
    a b function media_handle_sideload( $file_array, $post_id = 0, $desc = null, $post_d 
    504504 * Outputs the iframe to display the media upload page.
    505505 *
    506506 * @since 2.5.0
     507 * @since 5.3.0 Formalized the existing and already documented ...$args parameter
     508 *              by adding it to the function signature.
    507509 *
    508510 * @global int $body_id
    509511 *
  • src/wp-includes/capabilities.php

    diff --git a/src/wp-includes/capabilities.php b/src/wp-includes/capabilities.php
    index e3a18f6b28..53da5c8085 100644
    a b  
    2525 * 'delete_page', 'edit_post', 'edit_page', 'read_post', or 'read_page'.
    2626 *
    2727 * @since 2.0.0
     28 * @since 5.3.0 Formalized the existing and already documented ...$args parameter
     29 *              by adding it to the function signature.
    2830 *
    2931 * @global array $post_type_meta_caps Used to get post type meta capabilities.
    3032 *
    function map_meta_cap( $cap, $user_id, ...$args ) { 
    635637 * Note: Will always return true if the current user is a super admin, unless specifically denied.
    636638 *
    637639 * @since 2.0.0
     640 * @since 5.3.0 Formalized the existing and already documented ...$args parameter
     641 *              by adding it to the function signature.
    638642 *
    639643 * @see WP_User::has_cap()
    640644 * @see map_meta_cap()
    function current_user_can( $capability, ...$args ) { 
    668672 *     current_user_can_for_blog( $blog_id, 'edit_post_meta', $post->ID, $meta_key );
    669673 *
    670674 * @since 3.0.0
     675 * @since 5.3.0 Formalized the existing and already documented ...$args parameter
     676 *              by adding it to the function signature.
    671677 *
    672678 * @param int    $blog_id    Site ID.
    673679 * @param string $capability Capability name.
    function current_user_can_for_blog( $blog_id, $capability, ...$args ) { 
    709715 *     author_can( $post, 'edit_post_meta', $post->ID, $meta_key );
    710716 *
    711717 * @since 2.9.0
     718 * @since 5.3.0 Formalized the existing and already documented ...$args parameter
     719 *              by adding it to the function signature.
    712720 *
    713721 * @param int|WP_Post $post       Post ID or post object.
    714722 * @param string      $capability Capability name.
    function author_can( $post, $capability, ...$args ) { 
    744752 *     user_can( $user->ID, 'edit_post_meta', $post->ID, $meta_key );
    745753 *
    746754 * @since 3.1.0
     755 * @since 5.3.0 Formalized the existing and already documented ...$args parameter
     756 *              by adding it to the function signature.
    747757 *
    748758 * @param int|WP_User $user       User ID or object.
    749759 * @param string      $capability Capability name.
  • src/wp-includes/category-template.php

    diff --git a/src/wp-includes/category-template.php b/src/wp-includes/category-template.php
    index 56cbdf7b7f..e345169672 100644
    a b function _wp_object_count_sort_cb( $a, $b ) { 
    10541054/**
    10551055 * Retrieve HTML list content for category list.
    10561056 *
    1057  * @uses Walker_Category to create HTML list content.
    10581057 * @since 2.1.0
     1058 * @since 5.3.0 Formalized the existing ...$args parameter by adding it
     1059 *              to the function signature.
     1060 *
     1061 * @uses Walker_Category to create HTML list content.
    10591062 * @see Walker::walk() for parameters and return description.
    10601063 *
    10611064 * @param mixed ...$args Elements array, maximum hierarchical depth and optional additional arguments.
    function walk_category_tree( ...$args ) { 
    10741077/**
    10751078 * Retrieve HTML dropdown (select) content for category list.
    10761079 *
    1077  * @uses Walker_CategoryDropdown to create HTML dropdown content.
    10781080 * @since 2.1.0
     1081 * @since 5.3.0 Formalized the existing ...$args parameter by adding it
     1082 *              to the function signature.
     1083 *
     1084 * @uses Walker_CategoryDropdown to create HTML dropdown content.
    10791085 * @see Walker::walk() for parameters and return description.
    10801086 *
    10811087 * @param mixed ...$args Elements array, maximum hierarchical depth and optional additional arguments.
  • src/wp-includes/class-wp-dependency.php

    diff --git a/src/wp-includes/class-wp-dependency.php b/src/wp-includes/class-wp-dependency.php
    index 12a3b94634..a4ea92d41d 100644
    a b class _WP_Dependency { 
    8787         * Setup dependencies.
    8888         *
    8989         * @since 2.6.0
     90         * @since 5.3.0 Formalized the existing ...$args parameter by adding it
     91         *              to the function signature.
    9092         *
    9193         * @param ...$args Dependency information.
    9294         */
  • src/wp-includes/class-wp-user.php

    diff --git a/src/wp-includes/class-wp-user.php b/src/wp-includes/class-wp-user.php
    index a1c2b6e2c4..0631bafa42 100644
    a b class WP_User { 
    730730         * may produce unreliable results.
    731731         *
    732732         * @since 2.0.0
     733         * @since 5.3.0 Formalized the existing and already documented ...$args parameter
     734         *              by adding it to the function signature.
    733735         *
    734736         * @see map_meta_cap()
    735737         *
  • src/wp-includes/class-wp-walker.php

    diff --git a/src/wp-includes/class-wp-walker.php b/src/wp-includes/class-wp-walker.php
    index 0a764b9fc8..49e896f23f 100644
    a b class Walker { 
    177177         * $max_depth > 0 specifies the number of display levels.
    178178         *
    179179         * @since 2.1.0
     180         * @since 5.3.0 Formalized the existing ...$args parameter by adding
     181         *              it to the function signature.
    180182         *
    181183         * @param array $elements  An array of elements.
    182184         * @param int   $max_depth The maximum hierarchical depth.
    class Walker { 
    269271         * $max_depth > 0 specifies the number of display levels.
    270272         *
    271273         * @since 2.7.0
     274         * @since 5.3.0 Formalized the existing ...$args parameter by adding
     275         *              it to the function signature.
    272276         *
    273277         * @param array $elements
    274278         * @param int   $max_depth The maximum hierarchical depth.
  • src/wp-includes/formatting.php

    diff --git a/src/wp-includes/formatting.php b/src/wp-includes/formatting.php
    index acc8de9188..9ea3adbfa4 100644
    a b function wp_pre_kses_less_than_callback( $matches ) { 
    48684868 * WordPress implementation of PHP sprintf() with filters.
    48694869 *
    48704870 * @since 2.5.0
     4871 * @since 5.3.0 Formalized the existing and already documented ...$args parameter
     4872 *              by adding it to the function signature.
     4873 *
    48714874 * @link https://secure.php.net/sprintf
    48724875 *
    48734876 * @param string $pattern The string which formatted args are inserted.
  • src/wp-includes/functions.php

    diff --git a/src/wp-includes/functions.php b/src/wp-includes/functions.php
    index 717da22699..14a322a928 100644
    a b function _http_build_query( $data, $prefix = null, $sep = null, $key = '', $urle 
    10481048 * (XSS) attacks.
    10491049 *
    10501050 * @since 1.5.0
     1051 * @since 5.3.0 Formalized the existing and already documented parameters
     1052 *              by adding ...$args to the function signature.
    10511053 *
    10521054 * @param string|array $key   Either a query variable key, or an associative array of query variables.
    10531055 * @param string       $value Optional. Either a query variable value, or a URL to act upon.
  • src/wp-includes/plugin.php

    diff --git a/src/wp-includes/plugin.php b/src/wp-includes/plugin.php
    index 4dbab7412a..0e063eea1d 100644
    a b function add_action( $tag, $function_to_add, $priority = 10, $accepted_args = 1 
    430430 *     $value = do_action( 'example_action', $arg1, $arg2 );
    431431 *
    432432 * @since 1.2.0
     433 * @since 5.3.0 Formalized the existing and already documented ...$arg parameter
     434 *              by adding it to the function signature.
    433435 *
    434436 * @global array $wp_filter         Stores all of the filters
    435437 * @global array $wp_actions        Increments the amount of times action was triggered.
  • src/wp-includes/post-template.php

    diff --git a/src/wp-includes/post-template.php b/src/wp-includes/post-template.php
    index 939c8f617e..4e86063d20 100644
    a b function walk_page_tree( $pages, $depth, $current_page, $r ) { 
    15301530/**
    15311531 * Retrieve HTML dropdown (select) content for page list.
    15321532 *
    1533  * @uses Walker_PageDropdown to create HTML dropdown content.
    15341533 * @since 2.1.0
     1534 * @since 5.3.0 Formalized the existing ...$args parameter by adding it
     1535 *              to the function signature.
     1536 *
     1537 * @uses Walker_PageDropdown to create HTML dropdown content.
    15351538 * @see Walker_PageDropdown::walk() for parameters and return description.
    15361539 *
    15371540 * @return string
  • src/wp-includes/post.php

    diff --git a/src/wp-includes/post.php b/src/wp-includes/post.php
    index eea6a22b1a..45a0ae8396 100644
    a b function _add_post_type_submenus() { 
    18291829 *     ) );
    18301830 *
    18311831 * @since 3.0.0
     1832 * @since 5.3.0 Formalized the existing and already documented ...$args parameter
     1833 *              by adding it to the function signature.
    18321834 *
    18331835 * @global array $_wp_post_type_features
    18341836 *
  • src/wp-includes/theme.php

    diff --git a/src/wp-includes/theme.php b/src/wp-includes/theme.php
    index 2fb98bcb9d..5a9190d801 100644
    a b function get_theme_starter_content() { 
    23572357 *              `disable-custom-font-sizes`, `editor-color-palette`, `editor-font-sizes`,
    23582358 *              `editor-styles`, and `wp-block-styles` features were added.
    23592359 * @since 5.3.0 The `html5` feature now also accepts 'script' and 'style'.
     2360 * @since 5.3.0 Formalized the existing and already documented ...$args parameter
     2361 *              by adding it to the function signature.
    23602362 *
    23612363 * @global array $_wp_theme_features
    23622364 *
    function _custom_logo_header_styles() { 
    26712673 *     get_theme_support( 'custom-header', 'width' );
    26722674 *
    26732675 * @since 3.1.0
     2676 * @since 5.3.0 Formalized the existing and already documented ...$args parameter
     2677 *              by adding it to the function signature.
    26742678 *
    26752679 * @global array $_wp_theme_features
    26762680 *
    function _remove_theme_support( $feature ) { 
    27912795 *     current_theme_supports( 'html5', 'comment-form' );
    27922796 *
    27932797 * @since 2.9.0
     2798 * @since 5.3.0 Formalized the existing and already documented ...$args parameter
     2799 *              by adding it to the function signature.
    27942800 *
    27952801 * @global array $_wp_theme_features
    27962802 *
  • src/wp-includes/widgets.php

    diff --git a/src/wp-includes/widgets.php b/src/wp-includes/widgets.php
    index 5efd467494..2378611b6f 100644
    a b function is_registered_sidebar( $sidebar_id ) { 
    344344 * parameter is an empty string.
    345345 *
    346346 * @since 2.2.0
     347 * @since 5.3.0 Formalized the existing and already documented ...$params parameter
     348 *              by adding it to the function signature.
    347349 *
    348350 * @global array $wp_registered_widgets            Uses stored registered widgets.
    349351 * @global array $wp_registered_widget_controls    Stores the registered widget controls (options).
    function wp_unregister_sidebar_widget( $id ) { 
    481483 * Registers widget control callback for customizing options.
    482484 *
    483485 * @since 2.2.0
     486 * @since 5.3.0 Formalized the existing and already documented ...$params parameter
     487 *              by adding it to the function signature.
    484488 *
    485489 * @global array $wp_registered_widget_controls
    486490 * @global array $wp_registered_widget_updates
    function wp_register_widget_control( $id, $name, $control_callback, $options = a 
    556560 * Registers the update callback for a widget.
    557561 *
    558562 * @since 2.8.0
     563 * @since 5.3.0 Formalized the existing and already documented ...$params parameter
     564 *              by adding it to the function signature.
    559565 *
    560566 * @global array $wp_registered_widget_updates
    561567 *
    function _register_widget_update_callback( $id_base, $update_callback, $options 
    588594 * Registers the form callback for a widget.
    589595 *
    590596 * @since 2.8.0
     597 * @since 5.3.0 Formalized the existing and already documented ...$params parameter
     598 *              by adding it to the function signature.
    591599 *
    592600 * @global array $wp_registered_widget_controls
    593601 *
  • src/wp-includes/wp-db.php

    diff --git a/src/wp-includes/wp-db.php b/src/wp-includes/wp-db.php
    index 64da5169e1..7ab4167520 100644
    a b class wpdb { 
    12801280         *
    12811281         * @link https://secure.php.net/sprintf Description of syntax.
    12821282         * @since 2.3.0
     1283         * @since 5.3.0 Formalized the existing and already documented ...$args parameter
     1284         *              by updating the function signature to reflect this.
     1285         *              This changes the second parameter from $args to ...$args.
    12831286         *
    12841287         * @param string      $query   Query statement with sprintf()-like placeholders
    12851288         * @param array|mixed $args    The array of variables to substitute into the query's placeholders
  • tests/phpunit/includes/abstract-testcase.php

    diff --git a/tests/phpunit/includes/abstract-testcase.php b/tests/phpunit/includes/abstract-testcase.php
    index b31b7a2c90..d913213f38 100644
    a b abstract class WP_UnitTestCase_Base extends PHPUnit_Framework_TestCase { 
    899899         *
    900900         * @since 2.5.0
    901901         * @since 3.8.0 Moved from `Tests_Query_Conditionals` to `WP_UnitTestCase`.
     902         * @since 5.3.0 Formalized the existing ...$prop parameter by adding
     903         *              it to the function signature.
    902904         *
    903905         * @param string ...$prop Any number of WP_Query properties that are expected to be true for the current request.
    904906         */