ACF_Admin_Field_Groups::render_admin_table_columnpublicACF 5.9.0

Renders a specific admin table column.

Method of the class: ACF_Admin_Field_Groups{}

No Hooks.

Returns

null. Nothing (null).

Usage

$ACF_Admin_Field_Groups = new ACF_Admin_Field_Groups();
$ACF_Admin_Field_Groups->render_admin_table_column( $column_name, $post );
$column_name(string) (required)
The name of the column to display.
$post(array) (required)
The main ACF post array.

Changelog

Since 5.9.0 Introduced.

ACF_Admin_Field_Groups::render_admin_table_column() code ACF 6.8.8

public function render_admin_table_column( $column_name, $post ) {
	switch ( $column_name ) {

		// Key.
		case 'acf-key':
			echo '<i class="acf-icon acf-icon-key-solid"></i>';
			echo esc_html( $post['key'] );
			break;

		// Description.
		case 'acf-description':
			if ( ( is_string( $post['description'] ) || is_numeric( $post['description'] ) ) && ! empty( $post['description'] ) ) {
				echo '<span class="acf-description">' . acf_esc_html( $post['description'] ) . '</span>';
			} else {
				echo '<span class="acf-emdash" aria-hidden="true">—</span>';
				echo '<span class="screen-reader-text">' . esc_html__( 'No description', 'acf' ) . '</span>';
			}
			break;

		// Location.
		case 'acf-location':
			$this->render_admin_table_column_locations( $post );
			break;

		// Count.
		case 'acf-count':
			$this->render_admin_table_column_num_fields( $post );
			break;

		// Local JSON.
		case 'acf-json':
			$this->render_admin_table_column_local_status( $post );
			break;
	}
}