wpseek.com
Outil de recherche WordPress pour les développeurs et auteurs de thèmes



register_term_meta › WordPress Function

Depuis4.9.8
Dépréciéen/a
register_term_meta ( $taxonomy, $meta_key, $args )
Paramètres: (3)
  • (string) $taxonomy Taxonomy to register a meta key for. Pass an empty string to register the meta key across all existing taxonomies.
    Requis: Oui
  • (string) $meta_key The meta key to register.
    Requis: Oui
  • (array) $args Data used to describe the meta key when registered. See {@see} for a list of supported arguments.
    Requis: Oui
Retourne:
  • (bool) True if the meta key was successfully registered, false if not.
Défini(e) dans:
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 );
}