Make WordPress Core

Opened 9 years ago

Closed 8 years ago

Last modified 8 years ago

#43770 closed enhancement (invalid)

accept 'menu_order' for 'orderby' get_sites() argument

Reported by: gnowland Owned by:
Priority: normal Milestone:
Component: Networks and Sites Version: 5.1
Severity: normal Keywords:
Cc: Focuses: multisite

Description

Trying to show a list of sites in a multisite network with get_sites(), using 'menu_order' for the 'orderby' argument does not have any effect (sites are instead ordered by id).

Upon further investigation it appears that 'menu_order' is not one of the accepted options for 'orderby' (per codex page for get_sites()).

Plugins like Intuitive Custom Post Order allow re-ordering of sites, and indeed there is a menu_order column in the wp_blogs table with the correct order.

I would like to propose adding 'menu_order' as an accepted option for the 'orderby' argument of get_sites().

Would this be possible?

Change History (5)

#1 @earnjam
9 years ago

There is not a menu_order column on wp_blogs by default. That column is something that the ​Intuitive Custom Post Order plugin adds.

So unless we modify the db schema, then we can't do this in core. This feels like a niche situation to me and probably best left to plugins to execute.

#2 @soulseekah
8 years ago

Welcome to Trac! Thanks for your report.

I agree with @earnjam. This is indeed something that the plugin should be attending to and not core.

#3 @gnowland
8 years ago

  • Resolution → wontfix
  • Status new → closed

@earnjam @soulseekah Thank you gentlemen, I had not realized the menu_order column was added by Intuitive Custom Post Order Plugin, and I agree that in this case it would best be handled by that plugin. I will look into what filters are available. Thank you for your time. Cheers!

#4 @soulseekah
8 years ago

  • Resolution wontfix → invalid

#5 @netweb
8 years ago

  • Milestone Awaiting Review
Note: See TracTickets for help on using tickets.