Un motore di ricerca WordPress per sviluppatori e autori di temi



registered_meta_key_exists ›

Da4.6.0
Deprecaton/a
registered_meta_key_exists ( $object_type, $meta_key, $object_subtype = '' )
Parametri: (3)
  • (string) $object_type The type of object.
    Richiesto:
  • (string) $meta_key The meta key.
    Richiesto:
  • (string) $object_subtype Optional. The subtype of the object type.
    Richiesto: No
    Default: (vuoto)
Ritorna:
  • (bool) True if the meta key is registered to the object type and, if provided, the object subtype. False if not.
Definito a:
Codex:
ChangeLog:
  • 4.9.8

Checks if a meta key is registered.



Sorgenti

function registered_meta_key_exists( $object_type, $meta_key, $object_subtype = '' ) {
	$meta_keys = get_registered_meta_keys( $object_type, $object_subtype );

	return isset( $meta_keys[ $meta_key ] );
}