Make WordPress Core

Changeset 55398


Ignore:
Timestamp:
02/21/2023 04:37:03 PM (13 months ago)
Author:
SergeyBiryukov
Message:

Docs: Document default values for optional parameters in various DocBlocks.

Props paulkevan, costdev, audrasjb, SergeyBiryukov.
See #56792.

Location:
trunk/src/wp-includes
Files:
16 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-includes/author-template.php

    r54262 r55398  
    156156 *
    157157 * @param string    $field   Optional. The user field to retrieve. Default empty.
    158  * @param int|false $user_id Optional. User ID.
     158 * @param int|false $user_id Optional. User ID. Defaults to the current post author.
    159159 * @return string The author's field from the current author's DB object, otherwise an empty string.
    160160 */
     
    197197 * @param string    $field   Selects the field of the users record. See get_the_author_meta()
    198198 *                           for the list of possible fields.
    199  * @param int|false $user_id Optional. User ID.
     199 * @param int|false $user_id Optional. User ID. Defaults to the current post author.
    200200 *
    201201 * @see get_the_author_meta()
  • trunk/src/wp-includes/bookmark.php

    r53959 r55398  
    7272 * @param string $field    The name of the data field to return.
    7373 * @param int    $bookmark The bookmark ID to get field.
    74  * @param string $context  Optional. The context of how the field will be used.
     74 * @param string $context  Optional. The context of how the field will be used. Default 'display'.
    7575 * @return string|WP_Error
    7676 */
  • trunk/src/wp-includes/class-wp-editor.php

    r55276 r55398  
    14521452     * @param string $mce_locale The locale used for the editor.
    14531453     * @param bool   $json_only  Optional. Whether to include the JavaScript calls to tinymce.addI18n() and
    1454      *                           tinymce.ScriptLoader.markDone().
     1454     *                           tinymce.ScriptLoader.markDone(). Default false.
    14551455     * @return string Translation object, JSON encoded.
    14561456     */
     
    17521752     * @since 3.1.0
    17531753     *
    1754      * @param array $args Optional. Accepts 'pagenum' and 's' (search) arguments.
     1754     * @param array $args {
     1755     *     Optional. Array of link query arguments.
     1756     *
     1757     *     @type int    $pagenum Page number. Default 1.
     1758     *     @type string $s       Search keywords.
     1759     * }
    17551760     * @return array|false $results {
    17561761     *     An array of associative arrays of query results, false if there are none.
  • trunk/src/wp-includes/class-wp-error.php

    r54133 r55398  
    5757     * @param string|int $code    Error code.
    5858     * @param string     $message Error message.
    59      * @param mixed      $data    Optional. Error data.
     59     * @param mixed      $data    Optional. Error data. Default empty string.
    6060     */
    6161    public function __construct( $code = '', $message = '', $data = '' ) {
     
    104104     * @since 2.1.0
    105105     *
    106      * @param string|int $code Optional. Retrieve messages matching code, if exists.
     106     * @param string|int $code Optional. Error code to retrieve the messages for.
     107     *                         Default empty string.
    107108     * @return string[] Error strings on success, or empty array if there are none.
    108109     */
     
    133134     * @since 2.1.0
    134135     *
    135      * @param string|int $code Optional. Error code to retrieve message.
     136     * @param string|int $code Optional. Error code to retrieve the message for.
     137     *                         Default empty string.
    136138     * @return string The error message.
    137139     */
     
    152154     * @since 2.1.0
    153155     *
    154      * @param string|int $code Optional. Error code.
     156     * @param string|int $code Optional. Error code. Default empty string.
    155157     * @return mixed Error data, if it exists.
    156158     */
     
    186188     * @param string|int $code    Error code.
    187189     * @param string     $message Error message.
    188      * @param mixed      $data    Optional. Error data.
     190     * @param mixed      $data    Optional. Error data. Default empty string.
    189191     */
    190192    public function add( $code, $message, $data = '' ) {
  • trunk/src/wp-includes/class-wp-meta-query.php

    r55311 r55398  
    346346     * @param object $context           Optional. The main query object that corresponds to the type, for
    347347     *                                  example a `WP_Query`, `WP_User_Query`, or `WP_Site_Query`.
     348     *                                  Default null.
    348349     * @return string[]|false {
    349350     *     Array containing JOIN and WHERE SQL clauses to append to the main query,
     
    522523     * @param string $clause_key   Optional. The array key used to name the clause in the original `$meta_query`
    523524     *                             parameters. If not provided, a key will be generated automatically.
     525     *                             Default empty string.
    524526     * @return string[] {
    525527     *     Array containing JOIN and WHERE SQL clauses to append to a first-order query.
  • trunk/src/wp-includes/class-wp-widget.php

    r54133 r55398  
    153153     * @since 2.8.0
    154154     *
    155      * @param string $id_base         Optional. Base ID for the widget, lowercase and unique. If left empty,
     155     * @param string $id_base         Base ID for the widget, lowercase and unique. If left empty,
    156156     *                                a portion of the widget's PHP class name will be used. Has to be unique.
    157157     * @param string $name            Name for the widget displayed on the configuration page.
     
    189189     * @see WP_Widget::__construct()
    190190     *
    191      * @param string $id_base         Optional. Base ID for the widget, lowercase and unique. If left empty,
     191     * @param string $id_base         Base ID for the widget, lowercase and unique. If left empty,
    192192     *                                a portion of the widget's PHP class name will be used. Has to be unique.
    193193     * @param string $name            Name for the widget displayed on the configuration page.
  • trunk/src/wp-includes/class-wpdb.php

    r55158 r55398  
    10731073     *
    10741074     * @param int $blog_id
    1075      * @param int $network_id Optional.
     1075     * @param int $network_id Optional. Network ID. Default 0.
    10761076     * @return int Previous blog ID.
    10771077     */
     
    11021102     * @since 3.0.0
    11031103     *
    1104      * @param int $blog_id Optional.
     1104     * @param int $blog_id Optional. Blog ID to retrieve the table prefix for.
     1105     *                     Defaults to the current blog ID.
    11051106     * @return string Blog prefix.
    11061107     */
     
    12211222     *
    12221223     * @param string          $db  Database name.
    1223      * @param mysqli|resource $dbh Optional database connection.
     1224     * @param mysqli|resource $dbh Optional. Database connection.
     1225     *                             Defaults to the current database handle.
    12241226     */
    12251227    public function select( $db, $dbh = null ) {
     
    25622564     *                             A format is one of '%d', '%f', '%s' (integer, float, string).
    25632565     *                             If omitted, all values in $data will be treated as strings unless otherwise
    2564      *                             specified in wpdb::$field_types.
     2566     *                             specified in wpdb::$field_types. Default null.
    25652567     * @return int|false The number of rows inserted, or false on error.
    25662568     */
     
    25922594     *                             A format is one of '%d', '%f', '%s' (integer, float, string).
    25932595     *                             If omitted, all values in $data will be treated as strings unless otherwise
    2594      *                             specified in wpdb::$field_types.
     2596     *                             specified in wpdb::$field_types. Default null.
    25952597     * @return int|false The number of rows affected, or false on error.
    25962598     */
     
    26192621     *                             A format is one of '%d', '%f', '%s' (integer, float, string).
    26202622     *                             If omitted, all values in $data will be treated as strings unless otherwise
    2621      *                             specified in wpdb::$field_types.
     2623     *                             specified in wpdb::$field_types. Default null.
    26222624     * @param string       $type   Optional. Type of operation. Possible values include 'INSERT' or 'REPLACE'.
    26232625     *                             Default 'INSERT'.
     
    26852687     *                                   A format is one of '%d', '%f', '%s' (integer, float, string).
    26862688     *                                   If omitted, all values in $data will be treated as strings unless otherwise
    2687      *                                   specified in wpdb::$field_types.
     2689     *                                   specified in wpdb::$field_types. Default null.
    26882690     * @param array|string $where_format Optional. An array of formats to be mapped to each of the values in $where.
    26892691     *                                   If string, that format will be used for all of the items in $where.
    26902692     *                                   A format is one of '%d', '%f', '%s' (integer, float, string).
    2691      *                                   If omitted, all values in $where will be treated as strings.
     2693     *                                   If omitted, all values in $where will be treated as strings. Default null.
    26922694     * @return int|false The number of rows updated, or false on error.
    26932695     */
     
    27612763     *                                   A format is one of '%d', '%f', '%s' (integer, float, string).
    27622764     *                                   If omitted, all values in $data will be treated as strings unless otherwise
    2763      *                                   specified in wpdb::$field_types.
     2765     *                                   specified in wpdb::$field_types. Default null.
    27642766     * @return int|false The number of rows deleted, or false on error.
    27652767     */
     
    29682970     *
    29692971     * @param string|null $query Optional. SQL query. Defaults to null, use the result from the previous query.
    2970      * @param int         $x     Optional. Column of value to return. Indexed from 0.
    2971      * @param int         $y     Optional. Row of value to return. Indexed from 0.
     2972     * @param int         $x     Optional. Column of value to return. Indexed from 0. Default 0.
     2973     * @param int         $y     Optional. Row of value to return. Indexed from 0. Default 0.
    29722974     * @return string|null Database query result (as string), or null on failure.
    29732975     */
     
    30033005     *                            correspond to an stdClass object, an associative array, or a numeric array,
    30043006     *                            respectively. Default OBJECT.
    3005      * @param int         $y      Optional. Row to return. Indexed from 0.
     3007     * @param int         $y      Optional. Row to return. Indexed from 0. Default 0.
    30063008     * @return array|object|null|void Database query result in format specified by $output or null on failure.
    30073009     */
     
    30473049     *
    30483050     * @param string|null $query Optional. SQL query. Defaults to previous query.
    3049      * @param int         $x     Optional. Column to return. Indexed from 0.
     3051     * @param int         $x     Optional. Column to return. Indexed from 0. Default 0.
    30503052     * @return array Database query result. Array indexed from 0 by SQL result row number.
    30513053     */
     
    30843086     *                       return an associative array of row objects keyed by the value
    30853087     *                       of each row's first column's value. Duplicate keys are discarded.
     3088     *                       Default OBJECT.
    30863089     * @return array|object|null Database query results.
    30873090     */
  • trunk/src/wp-includes/comment-template.php

    r55395 r55398  
    21602160 *     @type bool     $echo              Whether to echo the output or return it. Default true.
    21612161 * }
    2162  * @param WP_Comment[] $comments Optional. Array of WP_Comment objects.
     2162 * @param WP_Comment[] $comments Optional. Array of WP_Comment objects. Default null.
    21632163 * @return void|string Void if 'echo' argument is true, or no comments to list.
    21642164 *                     Otherwise, HTML list of comments.
  • trunk/src/wp-includes/comment.php

    r55369 r55398  
    156156 *
    157157 * @param int   $post_id The ID of the post.
    158  * @param array $args    Optional. See WP_Comment_Query::__construct() for information on accepted arguments.
     158 * @param array $args    {
     159 *     Optional. See WP_Comment_Query::__construct() for information on accepted arguments.
     160 *
     161 *     @type int    $status  Comment status to limit results by. Defaults to approved comments.
     162 *     @type int    $post_id Limit results to those affiliated with a given post ID.
     163 *     @type string $order   How to order retrieved comments. Default 'ASC'.
     164 * }
    159165 * @return WP_Comment[]|int[]|int The approved comments, or number of comments if `$count`
    160166 *                                argument is true.
     
    237243 *
    238244 * @param string|array $args Optional. Array or string of arguments. See WP_Comment_Query::__construct()
    239  *                           for information on accepted arguments. Default empty.
     245 *                           for information on accepted arguments. Default empty string.
    240246 * @return WP_Comment[]|int[]|int List of comments or number of found comments if `$count` argument is true.
    241247 */
     
    450456 * @param mixed  $meta_value Optional. Metadata value. If provided,
    451457 *                           rows will only be removed that match the value.
    452  *                           Must be serializable if non-scalar. Default empty.
     458 *                           Must be serializable if non-scalar. Default empty string.
    453459 * @return bool True on success, false on failure.
    454460 */
     
    466472 * @param int    $comment_id Comment ID.
    467473 * @param string $key        Optional. The meta key to retrieve. By default,
    468  *                           returns data for all keys.
     474 *                           returns data for all keys. Default empty string.
    469475 * @param bool   $single     Optional. Whether to return a single value.
    470476 *                           This parameter has no effect if `$key` is not specified.
     
    496502 * @param mixed  $prev_value Optional. Previous value to check before updating.
    497503 *                           If specified, only update existing metadata entries with
    498  *                           this value. Otherwise, update all entries. Default empty.
     504 *                           this value. Otherwise, update all entries. Default empty string.
    499505 * @return int|bool Meta ID if the key didn't exist, true on successful update,
    500506 *                  false on failure or if the value passed to the function
     
    986992 *
    987993 * @param WP_Comment[] $comments Optional. Array of WP_Comment objects. Defaults to `$wp_query->comments`.
    988  * @param int          $per_page Optional. Comments per page.
    989  * @param bool         $threaded Optional. Control over flat or threaded comments.
     994 * @param int          $per_page Optional. Comments per page. Defaults to the value of `comments_per_page`
     995 *                               query var, option of the same name, or 1 (in that order).
     996 * @param bool         $threaded Optional. Control over flat or threaded comments. Defaults to the value
     997 *                               of `thread_comments` option.
    990998 * @return int Number of comment pages.
    991999 */
  • trunk/src/wp-includes/functions.php

    r55344 r55398  
    10501050 * @param string       $sep       Optional. Argument separator; defaults to 'arg_separator.output'.
    10511051 *                                Default null.
    1052  * @param string       $key       Optional. Used to prefix key name. Default empty.
     1052 * @param string       $key       Optional. Used to prefix key name. Default empty string.
    10531053 * @param bool         $urlencode Optional. Whether to use urlencode() in the result. Default true.
    10541054 * @return string The query string.
     
    14391439 * @param int    $code        HTTP status code.
    14401440 * @param string $description Optional. A custom description for the HTTP status.
     1441 *                            Defaults to the result of get_status_header_desc() for the given code.
    14411442 */
    14421443function status_header( $code, $description = '' ) {
     
    30013002 * @param string   $filename File name or path.
    30023003 * @param string[] $mimes    Optional. Array of allowed mime types keyed by their file extension regex.
     3004 *                           Defaults to the result of get_allowed_mime_types().
    30033005 * @return array {
    30043006 *     Values for the extension and mime type.
     
    30433045 *                           in a tmp directory).
    30443046 * @param string[] $mimes    Optional. Array of allowed mime types keyed by their file extension regex.
     3047 *                           Defaults to the result of get_allowed_mime_types().
    30453048 * @return array {
    30463049 *     Values for the extension, mime type, and corrected filename.
     
    36193622 * @param string|WP_Error  $message Optional. Error message. If this is a WP_Error object,
    36203623 *                                  and not an Ajax or XML-RPC request, the error's messages are used.
    3621  *                                  Default empty.
     3624 *                                  Default empty string.
    36223625 * @param string|int       $title   Optional. Error title. If `$message` is a `WP_Error` object,
    36233626 *                                  error data with the key 'title' may be used to specify the title.
    3624  *                                  If `$title` is an integer, then it is treated as the response
    3625  *                                  code. Default empty.
     3627 *                                  If `$title` is an integer, then it is treated as the response code.
     3628 *                                  Default empty string.
    36263629 * @param string|array|int $args {
    36273630 *     Optional. Arguments to control behavior. If `$args` is an integer, then it is treated
     
    37263729 *
    37273730 * @param string|WP_Error $message Error message or WP_Error object.
    3728  * @param string          $title   Optional. Error title. Default empty.
     3731 * @param string          $title   Optional. Error title. Default empty string.
    37293732 * @param string|array    $args    Optional. Arguments to control behavior. Default empty array.
    37303733 */
     
    39283931 *
    39293932 * @param string       $message Error message.
    3930  * @param string       $title   Optional. Error title (unused). Default empty.
     3933 * @param string       $title   Optional. Error title (unused). Default empty string.
    39313934 * @param string|array $args    Optional. Arguments to control behavior. Default empty array.
    39323935 */
     
    39703973 *
    39713974 * @param string       $message Error message.
    3972  * @param string       $title   Optional. Error title. Default empty.
     3975 * @param string       $title   Optional. Error title. Default empty string.
    39733976 * @param string|array $args    Optional. Arguments to control behavior. Default empty array.
    39743977 */
     
    40084011 *
    40094012 * @param string       $message Error message.
    4010  * @param string       $title   Optional. Error title. Default empty.
     4013 * @param string       $title   Optional. Error title. Default empty string.
    40114014 * @param string|array $args    Optional. Arguments to control behavior. Default empty array.
    40124015 */
     
    40524055 *
    40534056 * @param string       $message Error message.
    4054  * @param string       $title   Optional. Error title. Default empty.
     4057 * @param string       $title   Optional. Error title. Default empty string.
    40554058 * @param string|array $args    Optional. Arguments to control behavior. Default empty array.
    40564059 */
     
    40824085 *
    40834086 * @param string       $message Error message.
    4084  * @param string       $title   Optional. Error title. Default empty.
     4087 * @param string       $title   Optional. Error title. Default empty string.
    40854088 * @param string|array $args    Optional. Arguments to control behavior. Default empty array.
    40864089 */
     
    41264129 * @access private
    41274130 *
    4128  * @param string       $message Optional. Response to print. Default empty.
    4129  * @param string       $title   Optional. Error title (unused). Default empty.
     4131 * @param string       $message Optional. Response to print. Default empty string.
     4132 * @param string       $title   Optional. Error title (unused). Default empty string.
    41304133 * @param string|array $args    Optional. Arguments to control behavior. Default empty array.
    41314134 */
     
    41524155 *
    41534156 * @param string|WP_Error $message Error message or WP_Error object.
    4154  * @param string          $title   Optional. Error title. Default empty.
     4157 * @param string          $title   Optional. Error title. Default empty string.
    41554158 * @param string|array    $args    Optional. Arguments to control behavior. Default empty array.
    41564159 * @return array {
     
    45194522 *
    45204523 *     @type bool $associative Optional. When `true`, JSON objects will be returned as associative arrays.
    4521  *                             When `false`, JSON objects will be returned as objects.
     4524 *                             When `false`, JSON objects will be returned as objects. Default false.
    45224525 * }
    45234526 *
     
    53715374 * @param string $function_name The function that was called.
    53725375 * @param string $version       The version of WordPress that deprecated the function.
    5373  * @param string $replacement   Optional. The function that should have been called. Default empty.
     5376 * @param string $replacement   Optional. The function that should have been called. Default empty string.
    53745377 */
    53755378function _deprecated_function( $function_name, $version, $replacement = '' ) {
     
    55575560 * @param string $version     The version of WordPress that deprecated the file.
    55585561 * @param string $replacement Optional. The file that should have been included based on ABSPATH.
    5559  *                            Default empty.
    5560  * @param string $message     Optional. A message regarding the change. Default empty.
     5562 *                            Default empty string.
     5563 * @param string $message     Optional. A message regarding the change. Default empty string.
    55615564 */
    55625565function _deprecated_file( $file, $version, $replacement = '', $message = '' ) {
     
    56555658 * @param string $function_name The function that was called.
    56565659 * @param string $version       The version of WordPress that deprecated the argument used.
    5657  * @param string $message       Optional. A message regarding the change. Default empty.
     5660 * @param string $message       Optional. A message regarding the change. Default empty string.
    56585661 */
    56595662function _deprecated_argument( $function_name, $version, $message = '' ) {
     
    57435746 * @param string $hook        The hook that was used.
    57445747 * @param string $version     The version of WordPress that deprecated the hook.
    5745  * @param string $replacement Optional. The hook that should have been used. Default empty.
     5748 * @param string $replacement Optional. The hook that should have been used. Default empty string.
    57465749 * @param string $message     Optional. A message regarding the change. Default empty.
    57475750 */
     
    59875990 *
    59885991 * @param string   $file          File path.
    5989  * @param string[] $allowed_files Optional. Array of allowed files.
     5992 * @param string[] $allowed_files Optional. Array of allowed files. Default empty array.
    59905993 * @return int 0 means nothing is wrong, greater than 0 means something was wrong.
    59915994 */
     
    61056108 *
    61066109 * @param bool $suspend Optional. Suspends additions if true, re-enables them if false.
    6107  * @return bool The current suspend setting
     6110 *                      Defaults to not changing the current setting.
     6111 * @return bool The current suspend setting.
    61086112 */
    61096113function wp_suspend_cache_addition( $suspend = null ) {
     
    66366640 * @param array  $default_headers List of headers, in the format `array( 'HeaderKey' => 'Header Name' )`.
    66376641 * @param string $context         Optional. If specified adds filter hook {@see 'extra_$context_headers'}.
    6638  *                                Default empty.
     6642 *                                Default empty string.
    66396643 * @return string[] Array of file header values keyed by header name.
    66406644 */
     
    68106814 * @param int      $start         The ID to start the loop check at.
    68116815 * @param int      $start_parent  The parent_ID of $start to use instead of calling $callback( $start ).
    6812  *                                Use null to always use $callback
    6813  * @param array    $callback_args Optional. Additional arguments to send to $callback.
     6816 *                                Use null to always use $callback.
     6817 * @param array    $callback_args Optional. Additional arguments to send to $callback. Default empty array.
    68146818 * @return array IDs of all members of loop.
    68156819 */
     
    78147818 *
    78157819 * @param string $type The type of data to be anonymized.
    7816  * @param string $data Optional The data to be anonymized.
     7820 * @param string $data Optional. The data to be anonymized. Default empty string.
    78177821 * @return string The anonymous data for the requested type.
    78187822 */
     
    82478251 * @param string|string[] $exclude            Optional. Full path of a subdirectory to exclude from the total,
    82488252 *                                            or array of paths. Expected without trailing slash(es).
     8253 *                                            Default null.
    82498254 * @param int             $max_execution_time Optional. Maximum time to run before giving up. In seconds.
    82508255 *                                            The timeout is global and is measured from the moment
    8251  *                                            WordPress started to load.
     8256 *                                            WordPress started to load. Defaults to the value of
     8257 *                                            `max_execution_time` PHP setting.
    82528258 * @param array           $directory_cache    Optional. Array of cached directory paths.
     8259 *                                            Defaults to the value of `dirsize_cache` transient.
    82538260 * @return int|false|null Size in bytes if a valid directory. False if not. Null if timeout.
    82548261 */
  • trunk/src/wp-includes/meta.php

    r54510 r55398  
    172172 * @param mixed  $prev_value Optional. Previous value to check before updating.
    173173 *                           If specified, only update existing metadata entries with
    174  *                           this value. Otherwise, update all entries. Default empty.
     174 *                           this value. Otherwise, update all entries. Default empty string.
    175175 * @return int|bool The new meta field ID if a field with the given key didn't exist
    176176 *                  and was therefore added, true on successful update,
     
    370370 *                           (For backward compatibility, it is not possible to pass an empty string
    371371 *                           to delete those entries with an empty string for a value.)
     372 *                           Default empty string.
    372373 * @param bool   $delete_all Optional. If true, delete matching metadata entries for all objects,
    373374 *                           ignoring the specified object_id. Otherwise, only delete
     
    559560 * @param int    $object_id ID of the object metadata is for.
    560561 * @param string $meta_key  Optional. Metadata key. If not specified, retrieve all metadata for
    561  *                          the specified object. Default empty.
     562 *                          the specified object. Default empty string.
    562563 * @param bool   $single    Optional. If true, return only the first value of the specified `$meta_key`.
    563564 *                          This parameter has no effect if `$meta_key` is not specified. Default false.
     
    586587 * @param int    $object_id ID of the object metadata is for.
    587588 * @param string $meta_key  Optional. Metadata key. If not specified, retrieve all metadata for
    588  *                          the specified object. Default empty.
     589 *                          the specified object. Default empty string.
    589590 * @param bool   $single    Optional. If true, return only the first value of the specified `$meta_key`.
    590591 *                          This parameter has no effect if `$meta_key` is not specified. Default false.
     
    12311232 * @param string $primary_table     Primary database table name.
    12321233 * @param string $primary_id_column Primary ID column name.
    1233  * @param object $context           Optional. The main query object
     1234 * @param object $context           Optional. The main query object. Default null.
    12341235 * @return string[]|false {
    12351236 *     Array containing JOIN and WHERE SQL clauses to append to the main query,
     
    12751276 * @param string $meta_key  Metadata key.
    12761277 * @param string $meta_type Optional. Type of object metadata is for. Accepts 'post', 'comment', 'term', 'user',
    1277  *                          or any other object type with an associated meta table. Default empty.
     1278 *                          or any other object type with an associated meta table. Default empty string.
    12781279 * @return bool Whether the meta key is considered protected.
    12791280 */
     
    13051306 * @param string $object_type    Type of object metadata is for. Accepts 'post', 'comment', 'term', 'user',
    13061307 *                               or any other object type with an associated meta table.
    1307  * @param string $object_subtype Optional. The subtype of the object type.
     1308 * @param string $object_subtype Optional. The subtype of the object type. Default empty string.
    13081309 * @return mixed Sanitized $meta_value.
    13091310 */
     
    15811582 *                               or any other object type with an associated meta table.
    15821583 * @param string $meta_key       Metadata key.
    1583  * @param string $object_subtype Optional. The subtype of the object type.
     1584 * @param string $object_subtype Optional. The subtype of the object type. Default empty string.
    15841585 * @return bool True if the meta key is registered to the object type and, if provided,
    15851586 *              the object subtype. False if not.
     
    16001601 *                               or any other object type with an associated meta table.
    16011602 * @param string $meta_key       Metadata key.
    1602  * @param string $object_subtype Optional. The subtype of the object type.
     1603 * @param string $object_subtype Optional. The subtype of the object type. Default empty string.
    16031604 * @return bool True if successful. False if the meta key was not registered.
    16041605 */
     
    16491650 * @param string $object_type    Type of object metadata is for. Accepts 'post', 'comment', 'term', 'user',
    16501651 *                               or any other object type with an associated meta table.
    1651  * @param string $object_subtype Optional. The subtype of the object type.
     1652 * @param string $object_subtype Optional. The subtype of the object type. Default empty string.
    16521653 * @return array[] List of registered metadata args, keyed by their meta keys.
    16531654 */
  • trunk/src/wp-includes/ms-blogs.php

    r55148 r55398  
    121121 *
    122122 * @param int|string|array $fields  Optional. A blog ID, a blog slug, or an array of fields to query against.
    123  *                                  If not specified the current blog ID is used.
     123 *                                  Defaults to the current blog ID.
    124124 * @param bool             $get_all Whether to retrieve all details or only the details in the blogs table.
    125125 *                                  Default is true.
     
    398398 * @param int    $id     A blog ID. Can be null to refer to the current blog.
    399399 * @param string $option Name of option to add. Expected to not be SQL-escaped.
    400  * @param mixed  $value  Optional. Option value, can be anything. Expected to not be SQL-escaped.
     400 * @param mixed  $value  Option value, can be anything. Expected to not be SQL-escaped.
    401401 * @return bool True if the option was added, false otherwise.
    402402 */
  • trunk/src/wp-includes/ms-functions.php

    r55161 r55398  
    331331 *
    332332 * @param string $domain Website domain.
    333  * @param string $path   Optional. Not required for subdomain installations.
     333 * @param string $path   Optional. Not required for subdomain installations. Default '/'.
    334334 * @return int 0 if no blog found, otherwise the ID of the matching blog.
    335335 */
     
    607607 * @param string         $blog_title The blog title provided by the user.
    608608 * @param WP_User|string $user       Optional. The user object to check against the new site name.
     609 *                                   Default empty string.
    609610 * @return array {
    610611 *     Array of domain, path, blog name, blog title, user and error messages.
     
    13551356 *                           the new site. Default empty array.
    13561357 * @param int    $network_id Optional. Network ID. Only relevant on multi-network installations.
     1358 *                           Default 1.
    13571359 * @return int|WP_Error Returns WP_Error object on failure, the new site ID on success.
    13581360 */
     
    15401542 * @param string $domain     The domain to be checked.
    15411543 * @param string $path       The path to be checked.
    1542  * @param int    $network_id Optional. Network ID. Relevant only on multi-network installations.
     1544 * @param int    $network_id Optional. Network ID. Only relevant on multi-network installations.
     1545 *                           Default 1.
    15431546 * @return int|null The site ID if the site name exists, null otherwise.
    15441547 */
     
    15671570     * @param string   $domain     Domain to be checked.
    15681571     * @param string   $path       Path to be checked.
    1569      * @param int      $network_id Network ID. Relevant only on multi-network installations.
     1572     * @param int      $network_id Network ID. Only relevant on multi-network installations.
    15701573     */
    15711574    return apply_filters( 'domain_exists', $result, $domain, $path, $network_id );
  • trunk/src/wp-includes/post-formats.php

    r49693 r55398  
    4242 * @since 3.1.0
    4343 *
    44  * @param string|string[]  $format Optional. The format or formats to check.
     44 * @param string|string[]  $format Optional. The format or formats to check. Default empty array.
    4545 * @param WP_Post|int|null $post   Optional. The post to check. Defaults to the current post in the loop.
    4646 * @return bool True if the post has any of the given formats (or any format, if no format specified),
  • trunk/src/wp-includes/revision.php

    r55254 r55398  
    261261 *
    262262 * @param int $post_id The post ID.
    263  * @param int $user_id Optional. The post author ID.
     263 * @param int $user_id Optional. The post author ID. Default 0.
    264264 * @return WP_Post|false The autosaved data or false on failure or when no autosave exists.
    265265 */
     
    344344 * @param int|WP_Post|array|null $post     Post ID, post object OR post array.
    345345 * @param bool                   $autosave Optional. Whether the revision is an autosave or not.
     346 *                                         Default false.
    346347 * @return int|WP_Error WP_Error or 0 if error, new revision ID if success.
    347348 */
     
    392393 *                            correspond to a WP_Post object, an associative array, or a numeric array,
    393394 *                            respectively. Default OBJECT.
    394  * @param string      $filter Optional sanitization filter. See sanitize_post().
     395 * @param string      $filter Optional sanitization filter. See sanitize_post(). Default 'raw'.
    395396 * @return WP_Post|array|null WP_Post (or array) on success, or null on failure.
    396397 */
  • trunk/src/wp-includes/rss.php

    r55336 r55398  
    542542 *
    543543 * @param string $url URL to retrieve
    544  * @param array $headers Optional. Headers to send to the URL.
     544 * @param array $headers Optional. Headers to send to the URL. Default empty string.
    545545 * @return Snoopy style response
    546546 */
Note: See TracChangeset for help on using the changeset viewer.