acf_field_taxonomy::get_term_title()
Returns the Term's title displayed in the field UI.
Метод класса: acf_field_taxonomy{}
Хуки из метода
Возвращает
Строку
.
Использование
$acf_field_taxonomy = new acf_field_taxonomy(); $acf_field_taxonomy->get_term_title( $term, $field, $post_id );
- $term(WP_Term) (обязательный)
- The term object.
- $field(массив) (обязательный)
- The field settings.
- $post_id(разное)
- The post_id being edited.
Список изменений
С версии 5.0.0 | Введена. |
Код acf_field_taxonomy::get_term_title() acf field taxonomy::get term title ACF 6.0.4
function get_term_title( $term, $field, $post_id = 0 ) { $title = acf_get_term_title( $term ); // Default $post_id to current post being edited. $post_id = $post_id ? $post_id : acf_get_form_data( 'post_id' ); /** * Filters the term title. * * @date 1/11/2013 * @since 5.0.0 * * @param string $title The term title. * @param WP_Term $term The term object. * @param array $field The field settings. * @param (int|string) $post_id The post_id being edited. */ return apply_filters( 'acf/fields/taxonomy/result', $title, $term, $field, $post_id ); }