ACF_Admin_Field_Groups::admin_table_columns
Customizes the admin table columns.
Method of the class: ACF_Admin_Field_Groups{}
No Hooks.
Returns
Array.
Usage
$ACF_Admin_Field_Groups = new ACF_Admin_Field_Groups(); $ACF_Admin_Field_Groups->admin_table_columns( $_columns );
- $_columns(array) (required)
- The columns array.
Changelog
| Since 5.9.0 | Introduced. |
ACF_Admin_Field_Groups::admin_table_columns() ACF Admin Field Groups::admin table columns code 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;
}