#21816 closed task (blessed) (fixed)
Add explicit ordering to the gallery shortcode
Reported by: | koopersmith | Owned by: | markjaquith |
---|---|---|---|
Milestone: | 3.5 | Priority: | normal |
Severity: | normal | Version: | 3.5 |
Component: | Media | Keywords: | |
Focuses: | Cc: |
Description
One of the media improvements we've discussed for 3.5 is using IDs in the gallery shortcode to specify the included attachments. We can do this currently with the include shortcode, but attachments are not sorted in the order specified, but by another metric (be it menu_order or otherwise). Since the gallery is specific to a given post, arranging attachments in the order the IDs were provided is a sensible improvement.
Attachments (2)
Change History (7)
#2
@
12 years ago
Completely untested, and requires #13729 to be solved, which I'd really, really like.
#3
@
12 years ago
21816.patch is an attempt at sorting in PHP (with a bit of cleanup).
posts_per_page
wouldn't be an issue here, since get_posts()
adjusts it accordingly:
http://core.trac.wordpress.org/browser/tags/3.4.1/wp-includes/post.php#L1450
Note: See
TracTickets for help on using
tickets.
Maybe related: #13729?