[wp-trac] [WordPress Trac] #23873: Gallery shortcode orderby does not support multiple column sorting
WordPress Trac
noreply at wordpress.org
Wed Sep 24 23:23:39 UTC 2014
#23873: Gallery shortcode orderby does not support multiple column sorting
--------------------------+--------------------
Reporter: dglingren | Owner:
Type: defect (bug) | Status: new
Priority: normal | Milestone: 4.1
Component: Gallery | Version: 3.5.1
Severity: normal | Resolution:
Keywords: needs-patch | Focuses:
--------------------------+--------------------
Comment (by dglingren):
Thanks, @tyxla, for your update. I removed the check and did a bit of
testing. Without the check, you can specify multiple fields, e.g.,
orderby="author date title".
Since the shortcode parameters are passed as strings, the one thing you
can't do is specify column-by-column ASC/DESC values.
It seems like a bit of enhancement to the /wp-includes/query.php function
parse_orderby() would be able to support syntax like orderby="author date
DESC title", applying ASC or DESC to the column name that immediately
precedes it. I can't think of a drawback to this addition offhand.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/23873#comment:8>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list