Summery Summery
Adds metadata to a term.
Syntax Syntax
Parameters Parameters
- $term_id
-
(Required) Term ID.
- $meta_key
-
(Required) Metadata name.
- $meta_value
-
(Required) Metadata value.
- $unique
-
(Optional) Whether to bail if an entry with the same key is found for the term.
Default value: false
Return Return
(int|WP_Error|bool) Meta ID on success. WP_Error when term_id is ambiguous between taxonomies. False on failure.
Source Source
File: wp-includes/taxonomy.php
$terms = $term_query->query( $args ); // Count queries are not filtered, for legacy reasons. if ( ! is_array( $terms ) ) { return $terms; }
Advertisement
Changelog Changelog
Version | Description |
---|---|
4.4.0 | Introduced. |