Uma área de pesquisa sobre o WordPress para devs e autores do tema



get_registered_meta_keys ›

Desde4.6.0
Obsoleton/a
get_registered_meta_keys ( $object_type, $object_subtype = '' )
Parâmetros: (2)
  • (string) $object_type The type of object. Post, comment, user, term.
    Required: Yes
  • (string) $object_subtype Optional. The subtype of the object type.
    Required: No
    Padrão: (empty)
Retorna:
  • (array) List of registered meta keys.
Definido em:
Codex:
Log de mudanças:
  • 4.9.8

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



Fonte

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 ];
}