wpseek.com
Eine auf WordPress spezialiserte Suchmaschine für Entwickler und Theme-Autoren



wp_add_object_terms › WordPress Function

Seit3.6.0
Veraltetn/v
wp_add_object_terms ( $object_id, $terms, $taxonomy )
Parameter: (3)
  • (int) $object_id The ID of the object to which the terms will be added.
    Erforderlich: Ja
  • (string|int|array) $terms The slug(s) or ID(s) of the term(s) to add.
    Erforderlich: Ja
  • (array|string) $taxonomy Taxonomy name.
    Erforderlich: Ja
Gibt zurück:
  • (array|WP_Error) Term taxonomy IDs of the affected terms.
Definiert in:
Codex:

Adds term(s) associated with a given object.



Quellcode

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