Docs: Add a `@since` note about new parameters with the spread operator added to function signatures.

Props jrf.
See #47678.
Built from https://develop.svn.wordpress.org/trunk@46451


git-svn-id: http://core.svn.wordpress.org/trunk@46249 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
Sergey Biryukov 2019-10-09 04:28:02 +00:00
parent 6a38614ffe
commit 8d1e51e9c7
17 changed files with 65 additions and 4 deletions

View File

@ -77,6 +77,8 @@ class WP_Ajax_Upgrader_Skin extends Automatic_Upgrader_Skin {
* Stores a log entry for an error.
*
* @since 4.6.0
* @since 5.3.0 Formalized the existing `...$args` parameter by adding it
* to the function signature.
*
* @param string|WP_Error $errors Errors.
* @param mixed ...$args Optional text replacements.
@ -110,6 +112,8 @@ class WP_Ajax_Upgrader_Skin extends Automatic_Upgrader_Skin {
* Stores a log entry.
*
* @since 4.6.0
* @since 5.3.0 Formalized the existing `...$args` parameter by adding it
* to the function signature.
*
* @param string|array|WP_Error $data Log entry data.
* @param mixed ...$args Optional text replacements.

View File

@ -1055,6 +1055,8 @@ function wp_dashboard_rss_output( $widget_id ) {
* which is later replaced by Ajax call (see top of /wp-admin/index.php)
*
* @since 2.5.0
* @since 5.3.0 Formalized the existing and already documented `...$args` parameter
* by adding it to the function signature.
*
* @param string $widget_id The widget ID.
* @param callable $callback The callback funtion used to display each feed.

View File

@ -504,6 +504,8 @@ function media_handle_sideload( $file_array, $post_id = 0, $desc = null, $post_d
* Outputs the iframe to display the media upload page.
*
* @since 2.5.0
* @since 5.3.0 Formalized the existing and already documented `...$args` parameter
* by adding it to the function signature.
*
* @global int $body_id
*

View File

@ -25,6 +25,8 @@
* 'delete_page', 'edit_post', 'edit_page', 'read_post', or 'read_page'.
*
* @since 2.0.0
* @since 5.3.0 Formalized the existing and already documented `...$args` parameter
* by adding it to the function signature.
*
* @global array $post_type_meta_caps Used to get post type meta capabilities.
*
@ -635,6 +637,8 @@ function map_meta_cap( $cap, $user_id, ...$args ) {
* Note: Will always return true if the current user is a super admin, unless specifically denied.
*
* @since 2.0.0
* @since 5.3.0 Formalized the existing and already documented `...$args` parameter
* by adding it to the function signature.
*
* @see WP_User::has_cap()
* @see map_meta_cap()
@ -668,6 +672,8 @@ function current_user_can( $capability, ...$args ) {
* current_user_can_for_blog( $blog_id, 'edit_post_meta', $post->ID, $meta_key );
*
* @since 3.0.0
* @since 5.3.0 Formalized the existing and already documented `...$args` parameter
* by adding it to the function signature.
*
* @param int $blog_id Site ID.
* @param string $capability Capability name.
@ -709,6 +715,8 @@ function current_user_can_for_blog( $blog_id, $capability, ...$args ) {
* author_can( $post, 'edit_post_meta', $post->ID, $meta_key );
*
* @since 2.9.0
* @since 5.3.0 Formalized the existing and already documented `...$args` parameter
* by adding it to the function signature.
*
* @param int|WP_Post $post Post ID or post object.
* @param string $capability Capability name.
@ -744,6 +752,8 @@ function author_can( $post, $capability, ...$args ) {
* user_can( $user->ID, 'edit_post_meta', $post->ID, $meta_key );
*
* @since 3.1.0
* @since 5.3.0 Formalized the existing and already documented `...$args` parameter
* by adding it to the function signature.
*
* @param int|WP_User $user User ID or object.
* @param string $capability Capability name.

View File

@ -1054,8 +1054,11 @@ function _wp_object_count_sort_cb( $a, $b ) {
/**
* Retrieve HTML list content for category list.
*
* @uses Walker_Category to create HTML list content.
* @since 2.1.0
* @since 5.3.0 Formalized the existing `...$args` parameter by adding it
* to the function signature.
*
* @uses Walker_Category to create HTML list content.
* @see Walker::walk() for parameters and return description.
*
* @param mixed ...$args Elements array, maximum hierarchical depth and optional additional arguments.
@ -1074,8 +1077,11 @@ function walk_category_tree( ...$args ) {
/**
* Retrieve HTML dropdown (select) content for category list.
*
* @uses Walker_CategoryDropdown to create HTML dropdown content.
* @since 2.1.0
* @since 5.3.0 Formalized the existing `...$args` parameter by adding it
* to the function signature.
*
* @uses Walker_CategoryDropdown to create HTML dropdown content.
* @see Walker::walk() for parameters and return description.
*
* @param mixed ...$args Elements array, maximum hierarchical depth and optional additional arguments.

View File

@ -87,6 +87,8 @@ class _WP_Dependency {
* Setup dependencies.
*
* @since 2.6.0
* @since 5.3.0 Formalized the existing `...$args` parameter by adding it
* to the function signature.
*
* @param ...$args Dependency information.
*/

View File

@ -730,6 +730,8 @@ class WP_User {
* may produce unreliable results.
*
* @since 2.0.0
* @since 5.3.0 Formalized the existing and already documented `...$args` parameter
* by adding it to the function signature.
*
* @see map_meta_cap()
*

View File

@ -177,6 +177,8 @@ class Walker {
* $max_depth > 0 specifies the number of display levels.
*
* @since 2.1.0
* @since 5.3.0 Formalized the existing `...$args` parameter by adding
* it to the function signature.
*
* @param array $elements An array of elements.
* @param int $max_depth The maximum hierarchical depth.
@ -269,6 +271,8 @@ class Walker {
* $max_depth > 0 specifies the number of display levels.
*
* @since 2.7.0
* @since 5.3.0 Formalized the existing `...$args` parameter by adding
* it to the function signature.
*
* @param array $elements
* @param int $max_depth The maximum hierarchical depth.

View File

@ -4868,6 +4868,9 @@ function wp_pre_kses_less_than_callback( $matches ) {
* WordPress implementation of PHP sprintf() with filters.
*
* @since 2.5.0
* @since 5.3.0 Formalized the existing and already documented `...$args` parameter
* by adding it to the function signature.
*
* @link https://secure.php.net/sprintf
*
* @param string $pattern The string which formatted args are inserted.

View File

@ -1048,6 +1048,8 @@ function _http_build_query( $data, $prefix = null, $sep = null, $key = '', $urle
* (XSS) attacks.
*
* @since 1.5.0
* @since 5.3.0 Formalized the existing and already documented parameters
* by adding `...$args` to the function signature.
*
* @param string|array $key Either a query variable key, or an associative array of query variables.
* @param string $value Optional. Either a query variable value, or a URL to act upon.

View File

@ -430,6 +430,8 @@ function add_action( $tag, $function_to_add, $priority = 10, $accepted_args = 1
* $value = do_action( 'example_action', $arg1, $arg2 );
*
* @since 1.2.0
* @since 5.3.0 Formalized the existing and already documented `...$arg` parameter
* by adding it to the function signature.
*
* @global array $wp_filter Stores all of the filters
* @global array $wp_actions Increments the amount of times action was triggered.

View File

@ -1530,8 +1530,11 @@ function walk_page_tree( $pages, $depth, $current_page, $r ) {
/**
* Retrieve HTML dropdown (select) content for page list.
*
* @uses Walker_PageDropdown to create HTML dropdown content.
* @since 2.1.0
* @since 5.3.0 Formalized the existing `...$args` parameter by adding it
* to the function signature.
*
* @uses Walker_PageDropdown to create HTML dropdown content.
* @see Walker_PageDropdown::walk() for parameters and return description.
*
* @return string

View File

@ -1829,6 +1829,8 @@ function _add_post_type_submenus() {
* ) );
*
* @since 3.0.0
* @since 5.3.0 Formalized the existing and already documented `...$args` parameter
* by adding it to the function signature.
*
* @global array $_wp_post_type_features
*

View File

@ -2357,6 +2357,8 @@ function get_theme_starter_content() {
* `disable-custom-font-sizes`, `editor-color-palette`, `editor-font-sizes`,
* `editor-styles`, and `wp-block-styles` features were added.
* @since 5.3.0 The `html5` feature now also accepts 'script' and 'style'.
* @since 5.3.0 Formalized the existing and already documented `...$args` parameter
* by adding it to the function signature.
*
* @global array $_wp_theme_features
*
@ -2671,6 +2673,8 @@ function _custom_logo_header_styles() {
* get_theme_support( 'custom-header', 'width' );
*
* @since 3.1.0
* @since 5.3.0 Formalized the existing and already documented `...$args` parameter
* by adding it to the function signature.
*
* @global array $_wp_theme_features
*
@ -2791,6 +2795,8 @@ function _remove_theme_support( $feature ) {
* current_theme_supports( 'html5', 'comment-form' );
*
* @since 2.9.0
* @since 5.3.0 Formalized the existing and already documented `...$args` parameter
* by adding it to the function signature.
*
* @global array $_wp_theme_features
*

View File

@ -13,7 +13,7 @@
*
* @global string $wp_version
*/
$wp_version = '5.3-beta3-46450';
$wp_version = '5.3-beta3-46451';
/**
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.

View File

@ -344,6 +344,8 @@ function is_registered_sidebar( $sidebar_id ) {
* parameter is an empty string.
*
* @since 2.2.0
* @since 5.3.0 Formalized the existing and already documented `...$params` parameter
* by adding it to the function signature.
*
* @global array $wp_registered_widgets Uses stored registered widgets.
* @global array $wp_registered_widget_controls Stores the registered widget controls (options).
@ -481,6 +483,8 @@ function wp_unregister_sidebar_widget( $id ) {
* Registers widget control callback for customizing options.
*
* @since 2.2.0
* @since 5.3.0 Formalized the existing and already documented `...$params` parameter
* by adding it to the function signature.
*
* @global array $wp_registered_widget_controls
* @global array $wp_registered_widget_updates
@ -556,6 +560,8 @@ function wp_register_widget_control( $id, $name, $control_callback, $options = a
* Registers the update callback for a widget.
*
* @since 2.8.0
* @since 5.3.0 Formalized the existing and already documented `...$params` parameter
* by adding it to the function signature.
*
* @global array $wp_registered_widget_updates
*
@ -588,6 +594,8 @@ function _register_widget_update_callback( $id_base, $update_callback, $options
* Registers the form callback for a widget.
*
* @since 2.8.0
* @since 5.3.0 Formalized the existing and already documented `...$params` parameter
* by adding it to the function signature.
*
* @global array $wp_registered_widget_controls
*

View File

@ -1280,6 +1280,9 @@ class wpdb {
*
* @link https://secure.php.net/sprintf Description of syntax.
* @since 2.3.0
* @since 5.3.0 Formalized the existing and already documented `...$args` parameter
* by updating the function signature. The second parameter was changed
* from `$args` to `...$args`.
*
* @param string $query Query statement with sprintf()-like placeholders
* @param array|mixed $args The array of variables to substitute into the query's placeholders