WP_Terms_List_Table::get_sortable_columns()
Method of the class: WP_Terms_List_Table{}
No Hooks.
Return
Array
.
Usage
// protected - for code of main (parent) or child class $result = $this->get_sortable_columns();
WP_Terms_List_Table::get_sortable_columns() WP Terms List Table::get sortable columns code WP 6.7.1
protected function get_sortable_columns() { $taxonomy = $this->screen->taxonomy; if ( ! isset( $_GET['orderby'] ) && is_taxonomy_hierarchical( $taxonomy ) ) { $name_orderby_text = __( 'Table ordered hierarchically.' ); } else { $name_orderby_text = __( 'Table ordered by Name.' ); } return array( 'name' => array( 'name', false, _x( 'Name', 'term name' ), $name_orderby_text, 'asc' ), 'description' => array( 'description', false, __( 'Description' ), __( 'Table ordered by Description.' ) ), 'slug' => array( 'slug', false, __( 'Slug' ), __( 'Table ordered by Slug.' ) ), 'posts' => array( 'count', false, _x( 'Count', 'Number/count of items' ), __( 'Table ordered by Posts Count.' ) ), 'links' => array( 'count', false, __( 'Links' ), __( 'Table ordered by Links.' ) ), ); }