Gets a list of sortable columns.

Description Description

The format is:

  • 'internal-name' => 'orderby'
  • 'internal-name' => array( 'orderby', 'asc' ) – The second element sets the initial sorting order.
  • 'internal-name' => array( 'orderby', true ) – The second element makes the initial order descending.

Top ↑

Return Return


Top ↑

More Information More Information

This method should be overridden to return an associative array of columns that you want to make sortable. The associative array should follow the format 'column_slug'=>array('sortby',true), where the second property states whether the field is presorted. This is frequently used to provide part of the _column_headers property.

Top ↑

Source Source

File: wp-admin/includes/class-wp-list-table.php

	protected function get_sortable_columns() {
		return array();

Top ↑

Changelog Changelog

Version Description
3.1.0 Introduced.

Top ↑

User Contributed Notes User Contributed Notes

  1. Skip to note 1 content
    Contributed by Niloy
         * Get sortable columns
         * @return array
        function get_sortable_columns(){
            $s_columns = array (
                'title' => [ 'title', true], 
                'deposit' => [ 'deposit', true],
            return $s_columns;

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