WordPress.org

Make WordPress Core

Opened 6 years ago

Closed 4 years ago

#26752 closed enhancement (invalid)

Change default ordering of post types with page-attributes support in the Edit Posts list page

Reported by: ericlewis Owned by:
Milestone: Priority: normal
Severity: normal Version: 3.0
Component: Posts, Post Types Keywords:
Focuses: administration Cc:
PR Number:

Description

Since r12728, the Edit Post list (wp-admin/edit.php) defaults to ordering by menu_order only if the post type object is hierarchical. I find this a bit strange.

I'm not sure why hierarchicality would translate to "we should order posts by menu_order by default in the admin," but I'd wager I'm missing a use case there.

A post type adds menu_order support by way of adding 'page-attributes' at post type registration (at least as far as the admin UI interface controls are concerned). This quality of the post type should be checked for the logic here, perhaps in an OR relationship to support backwards compatibility and the use case I'm missing above.

Attachments (1)

26752.diff (683 bytes) - added by ericlewis 6 years ago.

Download all attachments as: .zip

Change History (7)

@ericlewis
6 years ago

#1 @ericlewis
6 years ago

  • Keywords has-patch added

#2 @ericlewis
6 years ago

attachment:26572.diff is probably a bit overeager, but works as a band-aid for now; some of the inner workings of hierarchical post types should be separated from post types that support page-attributes.

#3 @jeremyfelt
6 years ago

  • Component changed from Administration to Posts, Post Types
  • Focuses administration added

#4 @helen
6 years ago

I'm not sure why hierarchicality would translate to "we should order posts by menu_order by default in the admin

I don't know that that's *really* what that says - more that non-hierarchical posts are assumed to be chronological in nature, and that hierarchical posts are not.

It's not super clear to me what you want here - since page attributes can only be used to set menu order for hierarchical post types, and if a menu order is set even without the UI on, it seems to me that you'd still want to see them in that order.

#5 @chriscct7
4 years ago

  • Keywords 2nd-opinion added

#6 @ericlewis
4 years ago

  • Keywords has-patch 2nd-opinion removed
  • Milestone Awaiting Review deleted
  • Resolution set to invalid
  • Status changed from new to closed

It's not super clear to me what you want here

Neither do I reading this again ;P

Note: See TracTickets for help on using tickets.