From 9c6393e9671f60e5894dc6f98a5b8ed58dd2c322 Mon Sep 17 00:00:00 2001 From: John Blackbourn Date: Sat, 25 May 2019 21:59:51 +0000 Subject: [PATCH] Docs: Switch to the more common syntax for variadic function documentation. See #37402 Built from https://develop.svn.wordpress.org/trunk@45418 git-svn-id: http://core.svn.wordpress.org/trunk@45229 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-includes/class-wp-user.php | 10 +++++----- wp-includes/deprecated.php | 2 +- wp-includes/formatting.php | 4 ++-- wp-includes/plugin.php | 12 ++++++------ wp-includes/theme.php | 10 +++++----- wp-includes/version.php | 2 +- wp-includes/wp-db.php | 8 ++++---- 7 files changed, 24 insertions(+), 24 deletions(-) diff --git a/wp-includes/class-wp-user.php b/wp-includes/class-wp-user.php index 620aecd024..29c75b60f8 100644 --- a/wp-includes/class-wp-user.php +++ b/wp-includes/class-wp-user.php @@ -721,11 +721,11 @@ class WP_User { * * @see map_meta_cap() * - * @param string $cap Capability name. - * @param int $object_id,... Optional. ID of a specific object to check against if `$cap` is a "meta" capability. - * Meta capabilities such as `edit_post` and `edit_user` are capabilities used by - * by the `map_meta_cap()` function to map to primitive capabilities that a user or - * role has, such as `edit_posts` and `edit_others_posts`. + * @param string $cap Capability name. + * @param int ...$object_id Optional. ID of a specific object to check against if `$cap` is a "meta" capability. + * Meta capabilities such as `edit_post` and `edit_user` are capabilities used by + * by the `map_meta_cap()` function to map to primitive capabilities that a user or + * role has, such as `edit_posts` and `edit_others_posts`. * @return bool Whether the user has the given capability, or, if `$object_id` is passed, whether the user has * the given capability for that object. */ diff --git a/wp-includes/deprecated.php b/wp-includes/deprecated.php index f59cff1ea4..d928a2891f 100644 --- a/wp-includes/deprecated.php +++ b/wp-includes/deprecated.php @@ -2109,7 +2109,7 @@ function attribute_escape( $text ) { * @param string|int $name Widget ID. * @param callable $output_callback Run when widget is called. * @param string $classname Optional. Classname widget option. Default empty. - * @param mixed $params ,... Widget parameters. + * @param mixed ...$params Widget parameters. */ function register_sidebar_widget($name, $output_callback, $classname = '') { _deprecated_function( __FUNCTION__, '2.8.0', 'wp_register_sidebar_widget()' ); diff --git a/wp-includes/formatting.php b/wp-includes/formatting.php index ebb20d6a8e..2e349a0a3e 100644 --- a/wp-includes/formatting.php +++ b/wp-includes/formatting.php @@ -4811,8 +4811,8 @@ function wp_pre_kses_less_than_callback( $matches ) { * @since 2.5.0 * @link https://secure.php.net/sprintf * - * @param string $pattern The string which formatted args are inserted. - * @param mixed $args ,... Arguments to be formatted into the $pattern string. + * @param string $pattern The string which formatted args are inserted. + * @param mixed ...$args Arguments to be formatted into the $pattern string. * @return string The formatted string. */ function wp_sprintf( $pattern ) { diff --git a/wp-includes/plugin.php b/wp-includes/plugin.php index 879bb12fd4..7146e2ed20 100644 --- a/wp-includes/plugin.php +++ b/wp-includes/plugin.php @@ -170,9 +170,9 @@ function has_filter( $tag, $function_to_check = false ) { * @global array $wp_filter Stores all of the filters. * @global array $wp_current_filter Stores the list of current filters with the current one last. * - * @param string $tag The name of the filter hook. - * @param mixed $value The value on which the filters hooked to `$tag` are applied on. - * @param mixed $var,... Additional variables passed to the functions hooked to `$tag`. + * @param string $tag The name of the filter hook. + * @param mixed $value The value on which the filters hooked to `$tag` are applied on. + * @param mixed ...$var Additional variables passed to the functions hooked to `$tag`. * @return mixed The filtered value after all hooked functions are applied to it. */ function apply_filters( $tag, $value ) { @@ -421,9 +421,9 @@ function add_action( $tag, $function_to_add, $priority = 10, $accepted_args = 1 * @global array $wp_actions Increments the amount of times action was triggered. * @global array $wp_current_filter Stores the list of current filters with the current one last * - * @param string $tag The name of the action to be executed. - * @param mixed $arg,... Optional. Additional arguments which are passed on to the - * functions hooked to the action. Default empty. + * @param string $tag The name of the action to be executed. + * @param mixed ...$arg Optional. Additional arguments which are passed on to the + * functions hooked to the action. Default empty. */ function do_action( $tag, $arg = '' ) { global $wp_filter, $wp_actions, $wp_current_filter; diff --git a/wp-includes/theme.php b/wp-includes/theme.php index a6bf043f03..1682fdbdab 100644 --- a/wp-includes/theme.php +++ b/wp-includes/theme.php @@ -2330,11 +2330,11 @@ function get_theme_starter_content() { * * @global array $_wp_theme_features * - * @param string $feature The feature being added. Likely core values include 'post-formats', - * 'post-thumbnails', 'html5', 'custom-logo', 'custom-header-uploads', - * 'custom-header', 'custom-background', 'title-tag', 'starter-content', - * 'responsive-embeds', etc. - * @param mixed $args,... Optional extra arguments to pass along with certain features. + * @param string $feature The feature being added. Likely core values include 'post-formats', + * 'post-thumbnails', 'html5', 'custom-logo', 'custom-header-uploads', + * 'custom-header', 'custom-background', 'title-tag', 'starter-content', + * 'responsive-embeds', etc. + * @param mixed ...$args Optional extra arguments to pass along with certain features. * @return void|bool False on failure, void otherwise. */ function add_theme_support( $feature ) { diff --git a/wp-includes/version.php b/wp-includes/version.php index ac483e2d7b..22cc08730a 100644 --- a/wp-includes/version.php +++ b/wp-includes/version.php @@ -13,7 +13,7 @@ * * @global string $wp_version */ -$wp_version = '5.3-alpha-45417'; +$wp_version = '5.3-alpha-45418'; /** * Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema. diff --git a/wp-includes/wp-db.php b/wp-includes/wp-db.php index 39e9331692..fd997ad661 100644 --- a/wp-includes/wp-db.php +++ b/wp-includes/wp-db.php @@ -1286,10 +1286,10 @@ class wpdb { * @link https://secure.php.net/sprintf Description of syntax. * @since 2.3.0 * - * @param string $query Query statement with sprintf()-like placeholders - * @param array|mixed $args The array of variables to substitute into the query's placeholders if being called with an array of arguments, - * or the first variable to substitute into the query's placeholders if being called with individual arguments. - * @param mixed $args,... further variables to substitute into the query's placeholders if being called wih individual arguments. + * @param string $query Query statement with sprintf()-like placeholders + * @param array|mixed $args The array of variables to substitute into the query's placeholders if being called with an array of arguments, + * or the first variable to substitute into the query's placeholders if being called with individual arguments. + * @param mixed ...$args further variables to substitute into the query's placeholders if being called wih individual arguments. * @return string|void Sanitized query string, if there is a query to prepare. */ public function prepare( $query, $args ) {