WordPress.org

Make WordPress Core

Changeset 45418


Ignore:
Timestamp:
05/25/2019 09:58:18 PM (less than one hour ago)
Author:
johnbillion
Message:

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

See #37402

Location:
trunk
Files:
7 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-includes/class-wp-user.php

    r43651 r45418  
    722722     * @see map_meta_cap()
    723723     *
    724      * @param string $cap           Capability name.
    725      * @param int    $object_id,... Optional. ID of a specific object to check against if `$cap` is a "meta" capability.
    726      *                              Meta capabilities such as `edit_post` and `edit_user` are capabilities used by
    727      *                              by the `map_meta_cap()` function to map to primitive capabilities that a user or
    728      *                              role has, such as `edit_posts` and `edit_others_posts`.
     724     * @param string $cap          Capability name.
     725     * @param int    ...$object_id Optional. ID of a specific object to check against if `$cap` is a "meta" capability.
     726     *                             Meta capabilities such as `edit_post` and `edit_user` are capabilities used by
     727     *                             by the `map_meta_cap()` function to map to primitive capabilities that a user or
     728     *                             role has, such as `edit_posts` and `edit_others_posts`.
    729729     * @return bool Whether the user has the given capability, or, if `$object_id` is passed, whether the user has
    730730     *              the given capability for that object.
  • trunk/src/wp-includes/deprecated.php

    r44785 r45418  
    21102110 * @param callable   $output_callback Run when widget is called.
    21112111 * @param string     $classname       Optional. Classname widget option. Default empty.
    2112  * @param mixed      $params ,...     Widget parameters.
     2112 * @param mixed      ...$params       Widget parameters.
    21132113 */
    21142114function register_sidebar_widget($name, $output_callback, $classname = '') {
  • trunk/src/wp-includes/formatting.php

    r45408 r45418  
    48124812 * @link https://secure.php.net/sprintf
    48134813 *
    4814  * @param string $pattern   The string which formatted args are inserted.
    4815  * @param mixed  $args ,... Arguments to be formatted into the $pattern string.
     4814 * @param string $pattern The string which formatted args are inserted.
     4815 * @param mixed  ...$args Arguments to be formatted into the $pattern string.
    48164816 * @return string The formatted string.
    48174817 */
  • trunk/src/wp-includes/plugin.php

    r42343 r45418  
    171171 * @global array $wp_current_filter Stores the list of current filters with the current one last.
    172172 *
    173  * @param string $tag     The name of the filter hook.
    174  * @param mixed  $value   The value on which the filters hooked to `$tag` are applied on.
    175  * @param mixed  $var,... Additional variables passed to the functions hooked to `$tag`.
     173 * @param string $tag    The name of the filter hook.
     174 * @param mixed  $value  The value on which the filters hooked to `$tag` are applied on.
     175 * @param mixed  ...$var Additional variables passed to the functions hooked to `$tag`.
    176176 * @return mixed The filtered value after all hooked functions are applied to it.
    177177 */
     
    422422 * @global array $wp_current_filter Stores the list of current filters with the current one last
    423423 *
    424  * @param string $tag     The name of the action to be executed.
    425  * @param mixed  $arg,... Optional. Additional arguments which are passed on to the
    426  *                        functions hooked to the action. Default empty.
     424 * @param string $tag    The name of the action to be executed.
     425 * @param mixed  ...$arg Optional. Additional arguments which are passed on to the
     426 *                       functions hooked to the action. Default empty.
    427427 */
    428428function do_action( $tag, $arg = '' ) {
  • trunk/src/wp-includes/theme.php

    r45232 r45418  
    23312331 * @global array $_wp_theme_features
    23322332 *
    2333  * @param string $feature  The feature being added. Likely core values include 'post-formats',
    2334  *                         'post-thumbnails', 'html5', 'custom-logo', 'custom-header-uploads',
    2335  *                         'custom-header', 'custom-background', 'title-tag', 'starter-content',
    2336  *                         'responsive-embeds', etc.
    2337  * @param mixed  $args,... Optional extra arguments to pass along with certain features.
     2333 * @param string $feature The feature being added. Likely core values include 'post-formats',
     2334 *                        'post-thumbnails', 'html5', 'custom-logo', 'custom-header-uploads',
     2335 *                        'custom-header', 'custom-background', 'title-tag', 'starter-content',
     2336 *                        'responsive-embeds', etc.
     2337 * @param mixed  ...$args Optional extra arguments to pass along with certain features.
    23382338 * @return void|bool False on failure, void otherwise.
    23392339 */
  • trunk/src/wp-includes/wp-db.php

    r45232 r45418  
    12871287     * @since 2.3.0
    12881288     *
    1289      * @param string      $query    Query statement with sprintf()-like placeholders
    1290      * @param array|mixed $args     The array of variables to substitute into the query's placeholders if being called with an array of arguments,
    1291      *                              or the first variable to substitute into the query's placeholders if being called with individual arguments.
    1292      * @param mixed       $args,... further variables to substitute into the query's placeholders if being called wih individual arguments.
     1289     * @param string      $query   Query statement with sprintf()-like placeholders
     1290     * @param array|mixed $args    The array of variables to substitute into the query's placeholders if being called with an array of arguments,
     1291     *                             or the first variable to substitute into the query's placeholders if being called with individual arguments.
     1292     * @param mixed       ...$args further variables to substitute into the query's placeholders if being called wih individual arguments.
    12931293     * @return string|void Sanitized query string, if there is a query to prepare.
    12941294     */
  • trunk/tests/phpunit/includes/abstract-testcase.php

    r44966 r45418  
    909909     * @since 3.8.0 Moved from `Tests_Query_Conditionals` to `WP_UnitTestCase`.
    910910     *
    911      * @param string $prop,... Any number of WP_Query properties that are expected to be true for the current request.
     911     * @param string ...$prop Any number of WP_Query properties that are expected to be true for the current request.
    912912     */
    913913    public function assertQueryTrue() {
Note: See TracChangeset for help on using the changeset viewer.