Opened 12 years ago
Closed 12 years ago
#23617 closed defect (bug) (fixed)
Twenty Ten: retrofit with "get first gallery image" technique for gallery post format
Reported by: |
|
Owned by: |
|
---|---|---|---|
Milestone: | 3.6 | Priority: | normal |
Severity: | normal | Version: | |
Component: | Bundled Theme | Keywords: | has-patch |
Focuses: | Cc: |
Description
The goal is to replace the custom code in loop.php with a simpler, cleaner core function. Will probably need to provide back compat fallback for pre 3.6 versions, though.
See #22960 for the new image grabber function and #15385 for converting Twenty Ten to using get_template_part()
.
Attachments (4)
Change History (17)
#4
follow-up:
↓ 5
@
12 years ago
Quick test with 3.4.2 and Twenty Ten. Created a new gallery post, pasted in [gallery ids="619,618,617"]
as the content (grabbed 3 IDs from Media Library).
Works great on index, no errors. On single, the view is empty, though.
Tested with 3.5.1 and Twenty Ten, same post content. Exact opposite result: looks great on single, but empty view on index.
#5
in reply to:
↑ 4
@
12 years ago
Replying to lancewillett:
Tested with 3.5.1 and Twenty Ten, same post content. Exact opposite result: looks great on single, but empty view on index.
Scratch that, this was with 3.6 trunk latest.
#6
@
12 years ago
- Keywords needs-testing removed
Tests out great in 3.5.1 and 3.6 (previously I didn't have the patch attached correctly).
3.4.2 -- gallery is missing the images on single view (index looks fine).
#7
@
12 years ago
Patch doesn't tough the single view though. In 3.4 only images attached to the post were working with the gallery shortcode. The ability to add other pictures was just added in 3.5.
#8
@
12 years ago
Cool. Works for me, then.
Thoughts on moving to a function instead of code right in the template?
#9
@
12 years ago
.1 moves to functions.php to simplify the template file a bit, and provides better fallback for shortcodes without "ids" attributes.
#10
@
12 years ago
.2 patch fixes comment block for accuracy for new function and changes function to always return an array value.
#11
@
12 years ago
- Owner set to lancewillett
- Resolution set to fixed
- Status changed from new to closed
In 23826:
#12
@
12 years ago
- Resolution fixed deleted
- Status changed from closed to reopened
[24093] introduced a new $html
argument to get_post_galleries
which defaults to true and breaks gallery counts (displays always 1 without a thumbnail). 23617.3.diff addresses this, and also changes the function we check in function_exists
to the one that is actually used.
My comment in http://core.trac.wordpress.org/ticket/22907#comment:4 applies here, too. What back compat do we need to test, and can the code be moved into a function to keep the template file cleaner?