Uses
Uses | Description |
---|---|
wp-includes/taxonomy.php: wp_set_object_terms() | Create Term and Taxonomy Relationships. |
Add term(s) associated with a given object.
(int) (Required) The ID of the object to which the terms will be added.
(string|int|array) (Required) The slug(s) or ID(s) of the term(s) to add.
(array|string) (Required) Taxonomy name.
(array|WP_Error) Term taxonomy IDs of the affected terms.
File: wp-includes/taxonomy.php
function wp_add_object_terms( $object_id, $terms, $taxonomy ) { return wp_set_object_terms( $object_id, $terms, $taxonomy, true ); }
Version | Description |
---|---|
3.6.0 | Introduced. |
© 2003–2019 WordPress Foundation
Licensed under the GNU GPLv2+ License.
https://developer.wordpress.org/reference/functions/wp_add_object_terms