Docs: Switch to the more common syntax for variadic function documentation.

See #37402


git-svn-id: https://develop.svn.wordpress.org/trunk@45418 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
John Blackbourn 2019-05-25 21:58:18 +00:00
parent d013696652
commit b64f812a59
7 changed files with 24 additions and 24 deletions

View File

@ -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.
*/

View File

@ -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()' );

View File

@ -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 ) {

View File

@ -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;

View File

@ -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 ) {

View File

@ -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 ) {

View File

@ -908,7 +908,7 @@ abstract class WP_UnitTestCase_Base extends PHPUnit_Framework_TestCase {
* @since 2.5.0
* @since 3.8.0 Moved from `Tests_Query_Conditionals` to `WP_UnitTestCase`.
*
* @param string $prop,... Any number of WP_Query properties that are expected to be true for the current request.
* @param string ...$prop Any number of WP_Query properties that are expected to be true for the current request.
*/
public function assertQueryTrue() {
global $wp_query;