wpseek.com
A WordPress-centric search engine for devs and theme authors



register_term_meta › WordPress Function

Since4.9.8
Deprecatedn/a
register_term_meta ( $taxonomy, $meta_key, $args )
Parameters: (3)
  • (string) $taxonomy Taxonomy to register a meta key for. Pass an empty string to register the meta key across all existing taxonomies.
    Required: Yes
  • (string) $meta_key The meta key to register.
    Required: Yes
  • (array) $args Data used to describe the meta key when registered. See {@see} for a list of supported arguments.
    Required: Yes
Returns:
  • (bool) True if the meta key was successfully registered, false if not.
Defined at:
Codex:

Registers a meta key for terms.



Source

function register_term_meta( $taxonomy, $meta_key, array $args ) {
	$args['object_subtype'] = $taxonomy;

	return register_meta( 'term', $meta_key, $args );
}