Un motore di ricerca WordPress per sviluppatori e autori di temi



get_registered_meta_keys ›

Da4.6.0
Deprecaton/a
get_registered_meta_keys ( $object_type, $object_subtype = '' )
Parametri: (2)
  • (string) $object_type The type of object. Post, comment, user, term.
    Richiesto:
  • (string) $object_subtype Optional. The subtype of the object type.
    Richiesto: No
    Default: (vuoto)
Ritorna:
  • (array) List of registered meta keys.
Definito a:
Codex:
ChangeLog:
  • 4.9.8

Retrieves a list of registered meta keys for an object type.



Sorgenti

function get_registered_meta_keys( $object_type, $object_subtype = '' ) {
	global $wp_meta_keys;

	if ( ! is_array( $wp_meta_keys ) || ! isset( $wp_meta_keys[ $object_type ] ) || ! isset( $wp_meta_keys[ $object_type ][ $object_subtype ] ) ) {
		return array();
	}

	return $wp_meta_keys[ $object_type ][ $object_subtype ];
}