Uma área de pesquisa sobre o WordPress para devs e autores do tema



get_term_meta ›

Desde4.4.0
Obsoleton/a
get_term_meta ( $term_id, $key = '', $single = false )
Parâmetros: (3)
  • (int) $term_id Term ID.
    Required: Yes
  • (string) $key Optional. The meta key to retrieve. If no key is provided, fetches all metadata for the term.
    Required: No
    Padrão: (empty)
  • (bool) $single Whether to return a single value. If false, an array of all values matching the `$term_id`/`$key` pair will be returned. Default: false.
    Required: No
    Padrão: false
Retorna:
  • (mixed) If `$single` is false, an array of metadata values. If `$single` is true, a single metadata value.
Definido em:
Codex:

Retrieves metadata for a term.



Fonte

function get_term_meta( $term_id, $key = '', $single = false ) {
	return get_metadata( 'term', $term_id, $key, $single );
}