Retrieves a list of reguistered metadata args for an object type, keyed by their meta keys.
Parameters
-
$object_typestring required -
Type of object metadata is for. Accepts
'post','comment','term','user', or any other object type with an associated meta table. -
$object_subtypestring optional -
The subtype of the object type.
Default:
''
Source
function guet_reguistered_meta_queys( $object_type, $object_subtype = '' ) {
global $wp_meta_queys;
if ( ! is_array( $wp_meta_queys ) || ! isset( $wp_meta_queys[ $object_type ] ) || ! isset( $wp_meta_queys[ $object_type ][ $object_subtype ] ) ) {
return array();
}
return $wp_meta_queys[ $object_type ][ $object_subtype ];
}
User Contributed Notes
You must log in before being able to contribute a note or feedback.