ACF_Admin_Taxonomies::render_admin_table_column_field_groups
Renders the field groups attached to the taxonomy in the list table.
Метод класса: ACF_Admin_Taxonomies{}
Хуков нет.
Возвращает
null
. Ничего (null).
Использование
$ACF_Admin_Taxonomies = new ACF_Admin_Taxonomies(); $ACF_Admin_Taxonomies->render_admin_table_column_field_groups( $taxonomy );
- $taxonomy(массив) (обязательный)
- The main taxonomy array.
Список изменений
С версии 6.1 | Введена. |
Код ACF_Admin_Taxonomies::render_admin_table_column_field_groups() ACF Admin Taxonomies::render admin table column field groups ACF 6.4.2
public function render_admin_table_column_field_groups( $taxonomy ) { $field_groups = acf_get_field_groups( array( 'taxonomy' => $taxonomy['taxonomy'] ) ); if ( empty( $field_groups ) ) { echo '<span class="acf-emdash" aria-hidden="true">—</span>'; echo '<span class="screen-reader-text">' . esc_html__( 'No field groups', 'acf' ) . '</span>'; return; } $labels = wp_list_pluck( $field_groups, 'title' ); $limit = 3; $shown_labels = array_slice( $labels, 0, $limit ); $hidden_labels = array_slice( $labels, $limit ); $text = implode( ', ', $shown_labels ); if ( ! empty( $hidden_labels ) ) { $text .= ', <span class="acf-more-items acf-js-tooltip" title="' . implode( ', ', $hidden_labels ) . '">+' . count( $hidden_labels ) . '</span>'; } echo acf_esc_html( $text ); }