ACF_Admin_UI_Options_Pages::admin_table_columns
Customizes the admin table columns.
Method of the class: ACF_Admin_UI_Options_Pages{}
No Hooks.
Returns
Array.
Usage
$ACF_Admin_UI_Options_Pages = new ACF_Admin_UI_Options_Pages(); $ACF_Admin_UI_Options_Pages->admin_table_columns( $_columns );
- $_columns(array) (required)
- The columns array.
Changelog
| Since 5.9.0 | Introduced. |
ACF_Admin_UI_Options_Pages::admin_table_columns() ACF Admin UI Options Pages::admin table columns code ACF 6.8.8
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;
$wp_post_types[ $this->post_type ]->labels->not_found = $this->get_not_found_html();
}
$columns = array(
'cb' => $_columns['cb'],
'title' => $_columns['title'],
'acf-description' => __( 'Description', 'acf' ),
'acf-key' => __( 'Key', 'acf' ),
);
if ( acf_get_local_json_files( $this->post_type ) ) {
$columns['acf-json'] = __( 'Local JSON', 'acf' );
}
return $columns;
}