You appear to be a bot. Output may be restricted
Description
Get a list of all, hidden and sortable columns, with filter applied
Usage
$array = BW_List_Table::get_column_info();
Parameters
Returns
arraySource
File name: oik/admin/class-bw-list-table.phpLines:
1 to 56 of 56
protected function get_column_info() { // $_column_headers is already set / cached if ( isset( $this->_column_headers ) && is_array( $this->_column_headers ) ) { bw_trace2( $this->_column_headers, "this column_headers", false, BW_TRACE_VERBOSE ); if ( count( $this->_column_headers ) < 4 ) { $this->_column_headers[] = $this->get_primary_column_name(); } // Back-compat for list tables that have been manually setting $_column_headers for horse reasons. // In 4.3, we added a fourth argument for primary column. //$column_headers = array( array(), array(), array(), $this->get_primary_column_name() ); //foreach ( $this->_column_headers as $key => $value ) { // $column_headers[ $key ] = $value; //} //gob(); return $this->_column_headers; } $columns = get_column_headers( $this->screen ); $hidden = get_hidden_columns( $this->screen ); $sortable_columns = $this->get_sortable_columns(); bw_trace2( $sortable_columns, "sortable_columns", false, BW_TRACE_VERBOSE ); /** * Filter the list table sortable columns for a specific screen. * * The dynamic portion of the hook name, `$this->screen->id`, refers * to the ID of the current screen, usually a string. * * @since 3.5.0 * * @param array $sortable_columns An array of sortable columns. */ $_sortable = apply_filters( "manage_{$this->screen->id}_sortable_columns", $sortable_columns ); bw_trace2( $_sortable, "_sortable", false, BW_TRACE_VERBOSE ); $sortable = array(); foreach ( $_sortable as $id => $data ) { if ( empty( $data ) ) continue; $data = (array) $data; if ( !isset( $data[1] ) ) $data[1] = false; $sortable[$id] = $data; } $primary = $this->get_primary_column_name(); $this->_column_headers = array( $columns, $hidden, $sortable, $primary ); bw_trace2( $this->_column_headers, "this column_headers", false ); return $this->_column_headers; }View on GitHub View on Trac