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



wp_add_object_terms › WordPress Function

Since3.6.0
Deprecatedn/a
wp_add_object_terms ( $object_id, $terms, $taxonomy )
Parameters: (3)
  • (int) $object_id The ID of the object to which the terms will be added.
    Required: Yes
  • (string|int|array) $terms The slug(s) or ID(s) of the term(s) to add.
    Required: Yes
  • (array|string) $taxonomy Taxonomy name.
    Required: Yes
Returns:
  • (array|WP_Error) Term taxonomy IDs of the affected terms.
Defined at:
Codex:

Adds term(s) associated with a given object.



Source

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