Return false from metadata_exists() if the get_$type_metadata filter returns a false value.
props xknown. fixes #22746. Built from https://develop.svn.wordpress.org/trunk@27562 git-svn-id: http://core.svn.wordpress.org/trunk@27405 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
e1fde8d510
commit
0e2a70e8f5
|
@ -323,7 +323,7 @@ function metadata_exists( $meta_type, $object_id, $meta_key ) {
|
||||||
|
|
||||||
$check = apply_filters( "get_{$meta_type}_metadata", null, $object_id, $meta_key, true );
|
$check = apply_filters( "get_{$meta_type}_metadata", null, $object_id, $meta_key, true );
|
||||||
if ( null !== $check )
|
if ( null !== $check )
|
||||||
return true;
|
return (bool) $check;
|
||||||
|
|
||||||
$meta_cache = wp_cache_get( $object_id, $meta_type . '_meta' );
|
$meta_cache = wp_cache_get( $object_id, $meta_type . '_meta' );
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue