add_term_meta

Advertisement

Summery Summery

Adds metadata to a term.

Syntax Syntax

add_term_meta( int $term_id, string $meta_key, mixed $meta_value, bool $unique = false )

Parameters Parameters

$term_id

(int) (Required) Term ID.

$meta_key

(string) (Required) Metadata name.

$meta_value

(mixed) (Required) Metadata value.

$unique

(bool) (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


			

Advertisement

Changelog Changelog

Changelog
Version Description
4.4.0 Introduced.

Advertisement

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.