Make WordPress Core


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

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

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

File:
1 edited

Legend:

Unmodified
Added
Removed
  • 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 */
Note: See TracChangeset for help on using the changeset viewer.