diff --git src/wp-includes/meta.php src/wp-includes/meta.php
index 8833d3e..887779c 100644
|
|
|
function get_metadata($meta_type, $object_id, $meta_key = '', $single = false) {
|
| 463 | 463 | return false; |
| 464 | 464 | } |
| 465 | 465 | |
| 466 | | $object_id = absint( $object_id ); |
| | 466 | $object_id = intval( $object_id ); |
| 467 | 467 | if ( ! $object_id ) { |
| 468 | 468 | return false; |
| 469 | 469 | } |
| … |
… |
function get_metadata($meta_type, $object_id, $meta_key = '', $single = false) {
|
| 476 | 476 | * will effectively short-circuit the function. |
| 477 | 477 | * |
| 478 | 478 | * @since 3.1.0 |
| | 479 | * @since 4.7.0 The $object_id may be negative when representing placeholder objects. |
| 479 | 480 | * |
| 480 | 481 | * @param null|array|string $value The value get_metadata() should return - a single metadata value, |
| 481 | 482 | * or an array of values. |
| … |
… |
function get_metadata($meta_type, $object_id, $meta_key = '', $single = false) {
|
| 491 | 492 | return $check; |
| 492 | 493 | } |
| 493 | 494 | |
| | 495 | /* |
| | 496 | * A negative ID is used to represent a placeholder object. Since such an ID |
| | 497 | * could not exist in the DB where IDs are UNSIGNED INTEGERS then the function |
| | 498 | * must short circuit here. Meta for placeholder objects must be supplied |
| | 499 | * via the get_{$meta_type}_metadata filterl. |
| | 500 | * |
| | 501 | */ |
| | 502 | if ( $object_id < 0 ) { |
| | 503 | return false; |
| | 504 | } |
| | 505 | |
| 494 | 506 | $meta_cache = wp_cache_get($object_id, $meta_type . '_meta'); |
| 495 | 507 | |
| 496 | 508 | if ( !$meta_cache ) { |