Meta_Helper::get_term_value()publicYoast 1.0

Retrieve a taxonomy term's meta value(s).

Метод класса: Meta_Helper{}

Хуков нет.


Разное|true|false. Value for the $meta if one is given, might be the default. If no meta is given, an array of all the meta data for the term. False if the term does not exist or the $meta provided is invalid.


$Meta_Helper = new Meta_Helper();
$Meta_Helper->get_term_value( $term, $taxonomy, $meta );
$term(разное) (обязательный)
Term to get the meta value for either (string) term name, (int) term id or (object) term.
$taxonomy(строка) (обязательный)
Name of the taxonomy to which the term is attached.
Meta value to get (without prefix).
По умолчанию: null

Код Meta_Helper::get_term_value() Yoast 22.0

public function get_term_value( $term, $taxonomy, $meta = null ) {
	return WPSEO_Taxonomy_Meta::get_term_meta( $term, $taxonomy, $meta );