Make WordPress Core

Opened 14 years ago

Closed 14 years ago

Last modified 11 years ago

#17435 closed defect (bug) (invalid)

Inaccurate order and orderby values for sortable list table columns

Reported by: johnbillion's profile johnbillion Owned by:
Milestone: Priority: normal
Severity: normal Version: 3.1
Component: Administration Keywords:
Focuses: Cc:

Description

WP_List_Table->print_column_headers() detects the 'order' and 'orderby' parameters using $_GET. It should use the values from the actual query object instead.

Example: I have a custom post type that has sortable columns. The default values for 'order' and 'orderby' are overridden in the parse_request hook. WP_List_Table->print_column_headers() ignores these values and just uses the $_GET values. This results in incorrectly highlighted columns.

Patch coming up.

Attachments (1)

17435.patch (1.1 KB) - added by johnbillion 14 years ago.

Download all attachments as: .zip

Change History (5)

@johnbillion
14 years ago

#1 @johnbillion
14 years ago

  • Keywords has-patch added

Patch.

#2 @nacin
14 years ago

  • Milestone changed from Awaiting Review to 3.2
  • Version changed from 3.2 to 3.1

Nice.

#3 @johnbillion
14 years ago

  • Keywords has-patch removed
  • Resolution set to invalid
  • Status changed from new to closed

Ah you got in there before me nacin.

I'll scrap this actually, it breaks column headings for sortable columns that sort by meta_value. You can get around it by overriding the $_GET values instead of overriding the request in parse_request and everything works nicely.

#4 @SergeyBiryukov
11 years ago

  • Milestone 3.2 deleted
Note: See TracTickets for help on using tickets.