Un motore di ricerca WordPress per sviluppatori e autori di temi



wp_add_object_terms ›

Da3.6.0
Deprecaton/a
wp_add_object_terms ( $object_id, $terms, $taxonomy )
Parametri: (3)
  • (int) $object_id The ID of the object to which the terms will be added.
    Richiesto:
  • (string|int|array) $terms The slug(s) or ID(s) of the term(s) to add.
    Richiesto:
  • (array|string) $taxonomy Taxonomy name.
    Richiesto:
Ritorna:
  • (array|WP_Error) Term taxonomy IDs of the affected terms.
Definito a:
Codex:

Add term(s) associated with a given object.



Sorgenti

function wp_add_object_terms( $object_id, $terms, $taxonomy ) {
	return wp_set_object_terms( $object_id, $terms, $taxonomy, true );
}