ACF_Admin_Field_Groups::admin_table_columns()publicACF 5.9.0

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 6.0.4

public function admin_table_columns( $_columns ) {

	// Set the "no found" label to be our custom HTML for no results.
	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() ) {
		$columns['acf-json'] = __( 'Local JSON', 'acf' );
	}
	return $columns;
}