manage_(screen_id)_sortable_columns
Filters 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.
Usage
add_filter( 'manage_(screen_id)_sortable_columns', 'wp_kama_manage_screen_id_sortable_columns_filter' ); /** * Function for `manage_(screen_id)_sortable_columns` filter-hook. * * @param array $sortable_columns An array of sortable columns. * * @return array */ function wp_kama_manage_screen_id_sortable_columns_filter( $sortable_columns ){ // filter... return $sortable_columns; }
- $sortable_columns(array)
- An array of sortable columns.
Changelog
Since 3.1.0 | Introduced. |
Where the hook is called
manage_(screen_id)_sortable_columns
wp-admin/includes/class-wp-list-table.php 1344
$_sortable = apply_filters( "manage_{$this->screen->id}_sortable_columns", $sortable_columns );