metadata_exists [ WordPress Function ]
metadata_exists ( $meta_type, $object_id, $meta_key )
| Parameters: |
|
| Returns: |
|
| Defined at: |
|
Determine if a meta key is set for a given object
Source
<?php
function metadata_exists( $meta_type, $object_id, $meta_key ) {
if ( ! $meta_type )
return false;
if ( ! $object_id = absint( $object_id ) )
return false;
$check = apply_filters( "get_{$meta_type}_metadata", null, $object_id, $meta_key, true );
if ( null !== $check )
return true;
$meta_cache = wp_cache_get( $object_id, $meta_type . '_meta' );
if ( !$meta_cache ) {
$meta_cache = update_meta_cache( $meta_type, array( $object_id ) );
$meta_cache = $meta_cache[$object_id];
}
if ( isset( $meta_cache[ $meta_key ] ) )
return true;
return false;
}
?>
Examples [ wp-snippets.com ]
Top Google zoekresultaten
- Fatal error: Call to undefined function metadata_exists() - WordPress
Fatal error: Call to undefined function metadata_exists() /wp-includes/capabili (17 posts). allenwhite78. Member Posted 5 months ago #. Hi all, having amassive ...
wordpress.org - metadata_exists() WordPress function reference, arguments and ...
Determine if a meta key is set for a given object. Signature. metadata_exists( $ meta_type, $object_id, $meta_key ). meta_type: (string) Type of object metadata is ...
queryposts.com - metadata_exists (WordPress Function) - WPSeek.com
WordPress lookup for metadata_exists, a WordPress Function. wpseek.com is a WordPress-centric search tool for developers and theme authors.
wpseek.com - metadata_exists | A HitchHackers guide through WordPress
Dec 13, 2011 ... function metadata_exists( $meta_type, $object_id, $meta_key ) { if ( ! $meta_type ) return false; if ( ! $object_id = absint( $object_id ) ) return ...
hitchhackerguide.com