ACF_Admin_Field_Groups::admin_table_columns
Customizes the admin table columns.
Метод класса: ACF_Admin_Field_Groups{}
Хуков нет.
Возвращает
Массив.
Использование
$ACF_Admin_Field_Groups = new ACF_Admin_Field_Groups(); $ACF_Admin_Field_Groups->admin_table_columns( $_columns );
- $_columns(массив) (обязательный)
- The columns array.
Список изменений
| С версии 5.9.0 | Введена. |
Код ACF_Admin_Field_Groups::admin_table_columns() ACF Admin Field Groups::admin table columns ACF 6.4.2
public function admin_table_columns( $_columns ) {
// Set the "no found" label to be our custom HTML for no results.
if ( empty( acf_request_arg( 's' ) ) ) {
global $wp_post_types;
$this->not_found_label = $wp_post_types['acf-field-group']->labels->not_found;
$wp_post_types['acf-field-group']->labels->not_found = $this->get_not_found_html();
}
$columns = array(
'cb' => $_columns['cb'],
'title' => $_columns['title'],
'acf-description' => __( 'Description', 'acf' ),
'acf-key' => __( 'Key', 'acf' ),
'acf-location' => __( 'Location', 'acf' ),
'acf-count' => __( 'Fields', 'acf' ),
);
if ( acf_get_local_json_files( $this->post_type ) ) {
$columns['acf-json'] = __( 'Local JSON', 'acf' );
}
return $columns;
}