WordPress.org

Make WordPress Core

Opened 4 years ago

Closed 4 years ago

#18638 closed defect (bug) (fixed)

Add "name" to allowed_keys for sortable table list columns

Reported by: MarcusPope Owned by: ryan
Milestone: 3.3 Priority: normal
Severity: normal Version: 3.2.1
Component: Administration Keywords: has-patch
Focuses: Cc:

Description

WP currently supports adding the slug as a column to tables in the admin area. However there is no way to make it a sortable column because post_"name" can never be handled by the default case since the meta key will attempt to load from meta data or die from not passing the allowed_keys whitelist.

The attached patch simply adds "name" to the allowed keys array.

Attachments (1)

query.php.patch (605 bytes) - added by MarcusPope 4 years ago.

Download all attachments as: .zip

Change History (3)

@MarcusPope4 years ago

comment:1 @nacin4 years ago

  • Milestone changed from Awaiting Review to 3.3

postname is keyed, so this seems fine.

comment:2 @ryan4 years ago

  • Owner set to ryan
  • Resolution set to fixed
  • Status changed from new to closed

In [18838]:

Add name to list of allowed keys. Props MarcusPope. fixes #18638

Note: See TracTickets for help on using tickets.