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 { |
| 77 | 77 | * Stores a log entry for an error. |
| 78 | 78 | * |
| 79 | 79 | * @since 4.6.0 |
| | 80 | * @since 5.3.0 Formalized the existing ...$args parameter by adding it |
| | 81 | * to the function signature. |
| 80 | 82 | * |
| 81 | 83 | * @param string|WP_Error $errors Errors. |
| 82 | 84 | * @param mixed ...$args Optional text replacements. |
| … |
… |
class WP_Ajax_Upgrader_Skin extends Automatic_Upgrader_Skin { |
| 110 | 112 | * Stores a log entry. |
| 111 | 113 | * |
| 112 | 114 | * @since 4.6.0 |
| | 115 | * @since 5.3.0 Formalized the existing ...$args parameter by adding it |
| | 116 | * to the function signature. |
| 113 | 117 | * |
| 114 | 118 | * @param string|array|WP_Error $data Log entry data. |
| 115 | 119 | * @param mixed ...$args Optional text replacements. |
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 ) { |
| 1055 | 1055 | * which is later replaced by Ajax call (see top of /wp-admin/index.php) |
| 1056 | 1056 | * |
| 1057 | 1057 | * @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. |
| 1058 | 1060 | * |
| 1059 | 1061 | * @param string $widget_id The widget ID. |
| 1060 | 1062 | * @param callable $callback The callback funtion used to display each feed. |
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 |
| 504 | 504 | * Outputs the iframe to display the media upload page. |
| 505 | 505 | * |
| 506 | 506 | * @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. |
| 507 | 509 | * |
| 508 | 510 | * @global int $body_id |
| 509 | 511 | * |
diff --git a/src/wp-includes/capabilities.php b/src/wp-includes/capabilities.php
index e3a18f6b28..53da5c8085 100644
|
a
|
b
|
|
| 25 | 25 | * 'delete_page', 'edit_post', 'edit_page', 'read_post', or 'read_page'. |
| 26 | 26 | * |
| 27 | 27 | * @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. |
| 28 | 30 | * |
| 29 | 31 | * @global array $post_type_meta_caps Used to get post type meta capabilities. |
| 30 | 32 | * |
| … |
… |
function map_meta_cap( $cap, $user_id, ...$args ) { |
| 635 | 637 | * Note: Will always return true if the current user is a super admin, unless specifically denied. |
| 636 | 638 | * |
| 637 | 639 | * @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. |
| 638 | 642 | * |
| 639 | 643 | * @see WP_User::has_cap() |
| 640 | 644 | * @see map_meta_cap() |
| … |
… |
function current_user_can( $capability, ...$args ) { |
| 668 | 672 | * current_user_can_for_blog( $blog_id, 'edit_post_meta', $post->ID, $meta_key ); |
| 669 | 673 | * |
| 670 | 674 | * @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. |
| 671 | 677 | * |
| 672 | 678 | * @param int $blog_id Site ID. |
| 673 | 679 | * @param string $capability Capability name. |
| … |
… |
function current_user_can_for_blog( $blog_id, $capability, ...$args ) { |
| 709 | 715 | * author_can( $post, 'edit_post_meta', $post->ID, $meta_key ); |
| 710 | 716 | * |
| 711 | 717 | * @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. |
| 712 | 720 | * |
| 713 | 721 | * @param int|WP_Post $post Post ID or post object. |
| 714 | 722 | * @param string $capability Capability name. |
| … |
… |
function author_can( $post, $capability, ...$args ) { |
| 744 | 752 | * user_can( $user->ID, 'edit_post_meta', $post->ID, $meta_key ); |
| 745 | 753 | * |
| 746 | 754 | * @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. |
| 747 | 757 | * |
| 748 | 758 | * @param int|WP_User $user User ID or object. |
| 749 | 759 | * @param string $capability Capability name. |
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 ) { |
| 1054 | 1054 | /** |
| 1055 | 1055 | * Retrieve HTML list content for category list. |
| 1056 | 1056 | * |
| 1057 | | * @uses Walker_Category to create HTML list content. |
| 1058 | 1057 | * @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. |
| 1059 | 1062 | * @see Walker::walk() for parameters and return description. |
| 1060 | 1063 | * |
| 1061 | 1064 | * @param mixed ...$args Elements array, maximum hierarchical depth and optional additional arguments. |
| … |
… |
function walk_category_tree( ...$args ) { |
| 1074 | 1077 | /** |
| 1075 | 1078 | * Retrieve HTML dropdown (select) content for category list. |
| 1076 | 1079 | * |
| 1077 | | * @uses Walker_CategoryDropdown to create HTML dropdown content. |
| 1078 | 1080 | * @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. |
| 1079 | 1085 | * @see Walker::walk() for parameters and return description. |
| 1080 | 1086 | * |
| 1081 | 1087 | * @param mixed ...$args Elements array, maximum hierarchical depth and optional additional arguments. |
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 { |
| 87 | 87 | * Setup dependencies. |
| 88 | 88 | * |
| 89 | 89 | * @since 2.6.0 |
| | 90 | * @since 5.3.0 Formalized the existing ...$args parameter by adding it |
| | 91 | * to the function signature. |
| 90 | 92 | * |
| 91 | 93 | * @param ...$args Dependency information. |
| 92 | 94 | */ |
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 { |
| 730 | 730 | * may produce unreliable results. |
| 731 | 731 | * |
| 732 | 732 | * @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. |
| 733 | 735 | * |
| 734 | 736 | * @see map_meta_cap() |
| 735 | 737 | * |
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 { |
| 177 | 177 | * $max_depth > 0 specifies the number of display levels. |
| 178 | 178 | * |
| 179 | 179 | * @since 2.1.0 |
| | 180 | * @since 5.3.0 Formalized the existing ...$args parameter by adding |
| | 181 | * it to the function signature. |
| 180 | 182 | * |
| 181 | 183 | * @param array $elements An array of elements. |
| 182 | 184 | * @param int $max_depth The maximum hierarchical depth. |
| … |
… |
class Walker { |
| 269 | 271 | * $max_depth > 0 specifies the number of display levels. |
| 270 | 272 | * |
| 271 | 273 | * @since 2.7.0 |
| | 274 | * @since 5.3.0 Formalized the existing ...$args parameter by adding |
| | 275 | * it to the function signature. |
| 272 | 276 | * |
| 273 | 277 | * @param array $elements |
| 274 | 278 | * @param int $max_depth The maximum hierarchical depth. |
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 ) { |
| 4868 | 4868 | * WordPress implementation of PHP sprintf() with filters. |
| 4869 | 4869 | * |
| 4870 | 4870 | * @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 | * |
| 4871 | 4874 | * @link https://secure.php.net/sprintf |
| 4872 | 4875 | * |
| 4873 | 4876 | * @param string $pattern The string which formatted args are inserted. |
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 |
| 1048 | 1048 | * (XSS) attacks. |
| 1049 | 1049 | * |
| 1050 | 1050 | * @since 1.5.0 |
| | 1051 | * @since 5.3.0 Formalized the existing and already documented parameters |
| | 1052 | * by adding ...$args to the function signature. |
| 1051 | 1053 | * |
| 1052 | 1054 | * @param string|array $key Either a query variable key, or an associative array of query variables. |
| 1053 | 1055 | * @param string $value Optional. Either a query variable value, or a URL to act upon. |
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 |
| 430 | 430 | * $value = do_action( 'example_action', $arg1, $arg2 ); |
| 431 | 431 | * |
| 432 | 432 | * @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. |
| 433 | 435 | * |
| 434 | 436 | * @global array $wp_filter Stores all of the filters |
| 435 | 437 | * @global array $wp_actions Increments the amount of times action was triggered. |
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 ) { |
| 1530 | 1530 | /** |
| 1531 | 1531 | * Retrieve HTML dropdown (select) content for page list. |
| 1532 | 1532 | * |
| 1533 | | * @uses Walker_PageDropdown to create HTML dropdown content. |
| 1534 | 1533 | * @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. |
| 1535 | 1538 | * @see Walker_PageDropdown::walk() for parameters and return description. |
| 1536 | 1539 | * |
| 1537 | 1540 | * @return string |
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() { |
| 1829 | 1829 | * ) ); |
| 1830 | 1830 | * |
| 1831 | 1831 | * @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. |
| 1832 | 1834 | * |
| 1833 | 1835 | * @global array $_wp_post_type_features |
| 1834 | 1836 | * |
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() { |
| 2357 | 2357 | * `disable-custom-font-sizes`, `editor-color-palette`, `editor-font-sizes`, |
| 2358 | 2358 | * `editor-styles`, and `wp-block-styles` features were added. |
| 2359 | 2359 | * @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. |
| 2360 | 2362 | * |
| 2361 | 2363 | * @global array $_wp_theme_features |
| 2362 | 2364 | * |
| … |
… |
function _custom_logo_header_styles() { |
| 2671 | 2673 | * get_theme_support( 'custom-header', 'width' ); |
| 2672 | 2674 | * |
| 2673 | 2675 | * @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. |
| 2674 | 2678 | * |
| 2675 | 2679 | * @global array $_wp_theme_features |
| 2676 | 2680 | * |
| … |
… |
function _remove_theme_support( $feature ) { |
| 2791 | 2795 | * current_theme_supports( 'html5', 'comment-form' ); |
| 2792 | 2796 | * |
| 2793 | 2797 | * @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. |
| 2794 | 2800 | * |
| 2795 | 2801 | * @global array $_wp_theme_features |
| 2796 | 2802 | * |
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 ) { |
| 344 | 344 | * parameter is an empty string. |
| 345 | 345 | * |
| 346 | 346 | * @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. |
| 347 | 349 | * |
| 348 | 350 | * @global array $wp_registered_widgets Uses stored registered widgets. |
| 349 | 351 | * @global array $wp_registered_widget_controls Stores the registered widget controls (options). |
| … |
… |
function wp_unregister_sidebar_widget( $id ) { |
| 481 | 483 | * Registers widget control callback for customizing options. |
| 482 | 484 | * |
| 483 | 485 | * @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. |
| 484 | 488 | * |
| 485 | 489 | * @global array $wp_registered_widget_controls |
| 486 | 490 | * @global array $wp_registered_widget_updates |
| … |
… |
function wp_register_widget_control( $id, $name, $control_callback, $options = a |
| 556 | 560 | * Registers the update callback for a widget. |
| 557 | 561 | * |
| 558 | 562 | * @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. |
| 559 | 565 | * |
| 560 | 566 | * @global array $wp_registered_widget_updates |
| 561 | 567 | * |
| … |
… |
function _register_widget_update_callback( $id_base, $update_callback, $options |
| 588 | 594 | * Registers the form callback for a widget. |
| 589 | 595 | * |
| 590 | 596 | * @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. |
| 591 | 599 | * |
| 592 | 600 | * @global array $wp_registered_widget_controls |
| 593 | 601 | * |
diff --git a/src/wp-includes/wp-db.php b/src/wp-includes/wp-db.php
index 64da5169e1..7ab4167520 100644
|
a
|
b
|
class wpdb { |
| 1280 | 1280 | * |
| 1281 | 1281 | * @link https://secure.php.net/sprintf Description of syntax. |
| 1282 | 1282 | * @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. |
| 1283 | 1286 | * |
| 1284 | 1287 | * @param string $query Query statement with sprintf()-like placeholders |
| 1285 | 1288 | * @param array|mixed $args The array of variables to substitute into the query's placeholders |
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 { |
| 899 | 899 | * |
| 900 | 900 | * @since 2.5.0 |
| 901 | 901 | * @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. |
| 902 | 904 | * |
| 903 | 905 | * @param string ...$prop Any number of WP_Query properties that are expected to be true for the current request. |
| 904 | 906 | */ |