apply_filters( "manage_{$this->screen->id}_sortable_columns", array $sortable_columns )
Filters the list table sortable columns for a specific screen.
Description Description
The dynamic portion of the hook name, $this->screen->id
, refers to the ID of the current screen, usually a string.
Parameters Parameters
- $sortable_columns
-
(array) An array of sortable columns.
Source Source
Changelog Changelog
Version | Description |
---|---|
3.5.0 | Introduced. |
User Contributed Notes User Contributed Notes
You must log in before being able to contribute a note or feedback.
As an example. When you see the table with the posts in the admin screen, you can sort the posts by title. If you wanted to remove the ability to sort by the title you could do the following:
The screen ID for the posts overview page in the admin is
edit-post
, so the filter would be “manage_edit-post_sortable_columns”.Looking to sort the columns for the “sites” page in a multisite network? The following does not work as expected:
Instead, try: