[wp-trac] [WordPress Trac] #24868: Gallery shortcode removes orderby

WordPress Trac noreply at wordpress.org
Mon Jul 29 02:17:57 UTC 2013


#24868: Gallery shortcode removes orderby
--------------------------+------------------------------
 Reporter:  markoheijnen  |       Owner:
     Type:  defect (bug)  |      Status:  new
 Priority:  normal        |   Milestone:  Awaiting Review
Component:  Media         |     Version:  3.5
 Severity:  normal        |  Resolution:
 Keywords:  needs-patch   |
--------------------------+------------------------------

Comment (by nofearinc):

 This is not exactly a great fix, but I wasn't able to find a better
 solution.

 The problem was that all `orderby` actions are oriented around the `Random
 Order` checkbox in the gallery manager. Whenever "Random Order" is
 checked, the orderby attribute is placed with a value of "rand" and if the
 checkbox is empty, then no orderby attribute is set.

 The patch is adding another field that keeps the old value for
 persistence. If the "Random Order" value is not checked, the old orderby
 value is stored. If it is checked, then the value is updated - and finally
 if it was checked, but then unchecked, the orderby is cleared.

--
Ticket URL: <http://core.trac.wordpress.org/ticket/24868#comment:1>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software


More information about the wp-trac mailing list