Skip to content
Permalink
Browse files

Docs: Add a `@since` note about new parameters with the spread operat…

…or added to function signatures.

Props jrf.
See #47678.

git-svn-id: https://develop.svn.wordpress.org/trunk@46451 602fd350-edb4-49c9-b593-d223f7449a82
  • Loading branch information
SergeyBiryukov committed Oct 9, 2019
1 parent d4e9608 commit 8ec0a2116162d87725ada4166a5595e24acad732
@@ -77,6 +77,8 @@ public function get_error_messages() {
* 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 @@ public function error( $errors, ...$args ) {
* 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.
@@ -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.
@@ -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
*
@@ -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.
@@ -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.
@@ -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.
*/
@@ -730,6 +730,8 @@ public function remove_all_caps() {
* 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()
*
@@ -177,6 +177,8 @@ public function display_element( $element, &$children_elements, $max_depth, $dep
* $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 @@ public function walk( $elements, $max_depth, ...$args ) {
* $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.
@@ -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.
@@ -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.
@@ -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.
@@ -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
@@ -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
*
@@ -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
*
@@ -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
*
@@ -1280,6 +1280,9 @@ public function escape_by_ref( &$string ) {
*
* @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
@@ -899,6 +899,8 @@ public function temp_filename() {
*
* @since 2.5.0
* @since 3.8.0 Moved from `Tests_Query_Conditionals` to `WP_UnitTestCase`.
* @since 5.3.0 Formalized the existing `...$prop` parameter by adding it
* to the function signature.
*
* @param string ...$prop Any number of WP_Query properties that are expected to be true for the current request.
*/

0 comments on commit 8ec0a21

Please sign in to comment.
You can’t perform that action at this time.