Changeset 50641 for trunk/src/wp-includes/meta.php
- Timestamp:
- 04/02/2021 03:47:34 PM (4 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/meta.php
r49927 r50641 498 498 * @param string $meta_key Optional. Metadata key. If not specified, retrieve all metadata for 499 499 * the specified object. Default empty. 500 * @param bool $single Optional. If true, return only the first value of the specified meta_key. 501 * This parameter has no effect if meta_key is not specified. Default false. 502 * @return mixed Single metadata value, or array of values. 503 * False if there's a problem with the parameters passed to the function. 500 * @param bool $single Optional. If true, return only the first value of the specified `$meta_key`. 501 * This parameter has no effect if `$meta_key` is not specified. Default false. 502 * @return mixed An array of values if `$single` is false. 503 * The value of the meta field if `$single` is true. 504 * False for an invalid `$object_id` (non-numeric, zero, or negative value), 505 * or if `$meta_type` is not specified. 506 * An empty string if a valid but non-existing object ID is passed. 504 507 */ 505 508 function get_metadata( $meta_type, $object_id, $meta_key = '', $single = false ) { … … 522 525 * @param string $meta_key Optional. Metadata key. If not specified, retrieve all metadata for 523 526 * the specified object. Default empty. 524 * @param bool $single Optional. If true, return only the first value of the specified meta_key. 525 * This parameter has no effect if meta_key is not specified. Default false. 526 * @return mixed Single metadata value, or array of values. Null if the value does not exist. 527 * False if there's a problem with the parameters passed to the function. 527 * @param bool $single Optional. If true, return only the first value of the specified `$meta_key`. 528 * This parameter has no effect if `$meta_key` is not specified. Default false. 529 * @return mixed An array of values if `$single` is false. 530 * The value of the meta field if `$single` is true. 531 * False for an invalid `$object_id` (non-numeric, zero, or negative value), 532 * or if `$meta_type` is not specified. 533 * Null if the value does not exist. 528 534 */ 529 535 function get_metadata_raw( $meta_type, $object_id, $meta_key = '', $single = false ) { … … 609 615 * @param int $object_id ID of the object metadata is for. 610 616 * @param string $meta_key Metadata key. 611 * @param bool $single Optional. If true, return only the first value of the specified meta_key. 612 * This parameter has no effect if meta_key is not specified. Default false. 613 * @return mixed Single metadata value, or array of values. 617 * @param bool $single Optional. If true, return only the first value of the specified `$meta_key`. 618 * This parameter has no effect if `$meta_key` is not specified. Default false. 619 * @return mixed An array of default values if `$single` is false. 620 * The default value of the meta field if `$single` is true. 614 621 */ 615 622 function get_metadata_default( $meta_type, $object_id, $meta_key, $single = false ) { … … 1402 1409 * @param int $object_id ID of the object metadata is for. 1403 1410 * @param string $meta_key Metadata key. 1404 * @param bool $single If true, return only the first value of the specified meta_key.1405 * This parameter has no effect if meta_keyis not specified.1411 * @param bool $single If true, return only the first value of the specified `$meta_key`. 1412 * This parameter has no effect if `$meta_key` is not specified. 1406 1413 * @param string $meta_type Type of object metadata is for. Accepts 'post', 'comment', 'term', 'user', 1407 1414 * or any other object type with an associated meta table. 1408 * @return mixed Single metadata default, or array of defaults. 1415 * @return mixed An array of default values if `$single` is false. 1416 * The default value of the meta field if `$single` is true. 1409 1417 */ 1410 1418 function filter_default_metadata( $value, $object_id, $meta_key, $single, $meta_type ) {
Note: See TracChangeset
for help on using the changeset viewer.