LLMS_Admin_Table::get_columns( string $context = 'display' )

Retrieve the array of columns defined by set_columns.


Parameters Parameters

$context

(string) (Optional) Display context [display|export].

Default value: 'display'


Top ↑

Return Return

(array)


Top ↑

Source Source

File: includes/abstracts/abstract.llms.admin.table.php

	public function get_columns( $context = 'display' ) {

		/**
		 * Filters the array of table columns.
		 *
		 * The dynamic portion of this filter `{$this->id}` refers to the unique ID for the table.
		 *
		 * @since 3.2.0
		 *
		 * @param array  $columns The array of table columns.
		 * @param string $context Display context [display|export].
		 */
		$cols = apply_filters( "llms_table_get_{$this->id}_columns", $this->set_columns(), $context );

		if ( $this->is_exportable ) {

			foreach ( $cols as $id => $data ) {

				if ( ! $this->is_col_visible( $data, $context ) ) {
					unset( $cols[ $id ] );
				}
			}
		}

		return $cols;
	}


Top ↑

Changelog Changelog

Changelog
Version Description
3.24.0 Unknown.
3.2.0 Introduced.

Top ↑

User Contributed Notes User Contributed Notes

You must log in before being able to contribute a note or feedback.