A WordPress-centric search engine for devs and theme authors



get_registered_meta_keys ›

Since4.6.0
Deprecatedn/a
get_registered_meta_keys ( $object_type )
Parameters:
  • (string) $object_type The type of object. Post, comment, user, term.
    Required: Yes
Returns:
  • (array) List of registered meta keys.
Defined at:
Codex:

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



Source

function get_registered_meta_keys( $object_type ) {
	global $wp_meta_keys;

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

	return $wp_meta_keys[ $object_type ];
}