Changeset 48505
- Timestamp:
- 07/17/2020 03:14:00 PM (5 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/meta.php
r48504 r48505 545 545 * 546 546 * @since 3.1.0 547 * @since 5.5.0 Added the `$meta_type` parameter. 547 548 * 548 549 * @param mixed $value The value to return, either a single metadata value or an array … … 551 552 * @param string $meta_key Metadata key. 552 553 * @param bool $single Whether to return only the first value of the specified `$meta_key`. 554 * @param string $meta_type Type of object metadata is for. Accepts 'post', 'comment', 'term', 'user', 555 * or any other object type with an associated meta table. 553 556 */ 554 $check = apply_filters( "get_{$meta_type}_metadata", null, $object_id, $meta_key, $single );557 $check = apply_filters( "get_{$meta_type}_metadata", null, $object_id, $meta_key, $single, $meta_type ); 555 558 if ( null !== $check ) { 556 559 if ( $single && is_array( $check ) ) { … … 619 622 * @param mixed $value The value to return, either a single metadata value or an array 620 623 * of values depending on the value of `$single`. 624 * @param int $object_id ID of the object metadata is for. 625 * @param string $meta_key Metadata key. 626 * @param bool $single Whether to return only the first value of the specified `$meta_key`. 621 627 * @param string $meta_type Type of object metadata is for. Accepts 'post', 'comment', 'term', 'user', 622 628 * or any other object type with an associated meta table. 623 * @param string $meta_key Metadata key.624 * @param bool $single Whether to return only the first value of the specified `$meta_key`.625 * @param int $object_id ID of the object metadata is for.626 629 */ 627 $value = apply_filters( "default_{$meta_type}_metadata", $value, $ meta_type, $meta_key, $single, $object_id);630 $value = apply_filters( "default_{$meta_type}_metadata", $value, $object_id, $meta_key, $single, $meta_type ); 628 631 629 632 if ( ! $single && ! wp_is_numeric_array( $value ) ) { … … 1380 1383 * 1381 1384 * @param mixed $value Current value passed to filter. 1382 * @param string $meta_type Type of object metadata is for. Accepts 'post', 'comment', 'term', 'user', 1383 * or any other object type with an associated meta table. 1385 * @param int $object_id ID of the object metadata is for. 1384 1386 * @param string $meta_key Metadata key. 1385 1387 * @param bool $single If true, return only the first value of the specified meta_key. 1386 1388 * This parameter has no effect if meta_key is not specified. 1387 * @param int $object_id ID of the object metadata is for. 1389 * @param string $meta_type Type of object metadata is for. Accepts 'post', 'comment', 'term', 'user', 1390 * or any other object type with an associated meta table. 1388 1391 * @return mixed Single metadata default, or array of defaults. 1389 1392 */ 1390 function filter_default_metadata( $value, $ meta_type, $meta_key, $single, $object_id) {1393 function filter_default_metadata( $value, $object_id, $meta_key, $single, $meta_type ) { 1391 1394 global $wp_meta_keys; 1392 1395
Note: See TracChangeset
for help on using the changeset viewer.