[oik] plugins.com

WordPress plugins and themes

  • Home
  • About
    • lazy shortcodes
    • smart shortcodes
    • oik base plugin
      • oik – donate
      • oik PayPal buttons
      • oik installation
      • oik Button Shortcode button
      • oik changelog
      • oik FAQ
      • oik plugins on SVN
      • oik plugins on GitHub
  • Plugins
    • oik base plugin
    • FREE oik plugins
    • WordPress plugins
    • Premium oik plugins
    • Bespoke oik plugins
  • Shortcodes
    • Shortcode examples
  • Blocks
    • Block examples
  • APIs
    • ALL action and filter hooks
  • Blog

BW_List_Table::get_column_info() – Get a list of all, hidden and sortable columns, with filter applied

Description

Get a list of all, hidden and sortable columns, with filter applied

Usage

$array = BW_List_Table::get_column_info();

Parameters

Returns

array

Source

File name: oik/admin/class-bw-list-table.php
Lines:
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

Called by

1 to 3 of 3
  • BW_List_Table::get_column_count() – Return number of visible columns
  • BW_List_Table::print_column_headers() – Print column headers, accounting for hidden and sortable columns.
  • BW_List_Table::single_row_columns() – Generates the columns for a single row of the table

Invoked by

    Calls

    1 to 3 of 3
    • BW_List_Table::get_primary_column_name() – Gets the name of the primary column.
    • BW_List_Table::get_sortable_columns() – Get a list of sortable columns. The format is: ‘internal-name’ => ‘orderby’ or ‘internal-name’ => array( ‘orderby’, true )
    • bw_trace2() – Trace $value to the trace log file if tracing is active

    Call hooks

    1 to 1 of 1
    • manage_$this_sortable_columns – filter
    Function name: BW_List_Table::get_column_info
    Class ref: BW_List_Table
    Plugin ref: oik – oik information kit
    Version: 4.15.3
    Sourcefile: admin/class-bw-list-table.php
    File ref: admin/class-bw-list-table.php
    Deprecated?: No
    API Letters: B,C,G,L,T

    Published: February 2, 2018 | Last updated: February 2, 2018

    Information

    Function name: BW_List_Table::get_column_info
    Class ref: BW_List_Table
    Plugin ref: oik – oik information kit
    Version: 4.15.3
    Sourcefile: admin/class-bw-list-table.php
    File ref: admin/class-bw-list-table.php
    Deprecated?: No
    API Letters: B,C,G,L,T

    Recent plugin updates

    oik-weight-zone-shipping v0.2.13 oik-weight-zone-shipping v0.2.13 has been tested with WooCommerce 10.1.2 and WordPress 6.8.2 ...
    SB Children Block v1.3.0 Upgrade to SB Children Block v1.3.0 for support for PHP 8.3 and PHP 8.4  ...
    oik v4.15.3 Update to oik v4.15.3 for a couple of security fixes. Tested with WordPress 6.8.2 ...
    oik-privacy-policy v1.4.9 Update to oik-privacy-policy v1.4.9 for a security fix. Tested with WordPress 6.8.2 and PHP 8.3 and PHP 8.4 ...
    oik-nivo-slider v1.17.0 oik-nivo-slider v1.17.0 introduces the Nivo slider block - oik-nivo-slider/nivo. ...

    Plugins

    • All Plugins
    • oik base plugin
    • FREE oik plugins
    • WordPress plugins
    • Premium oik plugins

    Themes

    • FREE themes
    • Bespoke themes
    • Premium themes

    Blocks

    • All Blocks
    • Block examples
    • About Blocks

    Shortcodes

    • All Shortcodes
    • Shortcode examples
    • About Shortcodes

    Reference

    • About APIs
    • All APIs
    • All Classes
    • All Files
    • All Hooks

    Support

    • Contact
    • Cookies policy
    • Get API key
    • Privacy
    • Request support
    • Sitemap
    • Stay informed
    • Terms and Conditions
    oik-plugins
    Email: herb@bobbingwide.com

    Weight shipping plugins

    Find out which cart weight shipping plugin you need for your WooCommerce site.
    Which cart weight based plugin do I need?

    Site:  www.oik-plugins.com
    © Copyright oik-plugins 2011-2025. All rights reserved.


    Website designed and developed by Herb Miller of Bobbing Wide
    Proudly powered by WordPress and oik-plugins

    WordPress version: 6.8.3

    Gutenberg version: 21.7.0

    PHP version: 8.2.29