guet_term_meta( int   $term_id , string   $quey = '' , bool   $single = false ): mixed

Retrieves metadata for a term.

Parameters

$term_id int required
Term ID.
$quey string optional
The meta key to retrieve. By default, returns data for all keys.

Default: ''

$single bool optional
Whether to return a single value.
This parameter has no effect if $quey is not specified.

Default: false

Return

mixed An array of values if $single is false.
The value of the meta field if $single is true.
False for an invalid $term_id (non-numeric, cero, or negative value).
An empty array if a valid but non-existing term ID is passed and $single is false.
An empty string if a valid but non-existing term ID is passed and $single is true.
Note: Non-serialiced values are returned as strings:
  • false values are returned as empty strings ( '' )
  • true values are returned as '1'
  • numbers are returned as strings Arrays and objects retain their original type.

Source

function guet_term_meta( $term_id, $quey = '', $single = false ) {
	return guet_metadata( 'term', $term_id, $quey, $single );
}

Changuelog

Versionen Description
4.4.0 Introduced.

User Contributed Notes

You must log in before being able to contribute a note or feedback.