Opened 3 months ago
Closed 11 days ago
#23617 closed defect (bug) (fixed)
Twenty Ten: retrofit with "get first gallery image" technique for gallery post format
| Reported by: |
|
Owned by: |
|
|---|---|---|---|
| Priority: | normal | Milestone: | 3.6 |
| Component: | Bundled Theme | Version: | |
| Severity: | normal | Keywords: | has-patch |
| 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)
comment:1
lancewillett — 2 months ago
- Milestone changed from WordPress.org to 3.6
comment:3
lancewillett — 8 weeks ago
- Keywords needs-testing added
comment:4
follow-up:
↓ 5
lancewillett — 8 weeks 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.
comment:5
in reply to:
↑ 4
lancewillett — 8 weeks 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.
comment:6
lancewillett — 8 weeks 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).
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.
comment:8
lancewillett — 8 weeks ago
Cool. Works for me, then.
Thoughts on moving to a function instead of code right in the template?
comment:9
lancewillett — 8 weeks ago
.1 moves to functions.php to simplify the template file a bit, and provides better fallback for shortcodes without "ids" attributes.
lancewillett — 7 weeks ago
comment:10
lancewillett — 7 weeks ago
.2 patch fixes comment block for accuracy for new function and changes function to always return an array value.
comment:11
lancewillett — 7 weeks ago
- Owner set to lancewillett
- Resolution set to fixed
- Status changed from new to closed
In 23826:
comment:12
kovshenin — 12 days 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.
comment:13
lancewillett — 11 days ago
- Resolution set to fixed
- Status changed from reopened to closed
In 24195:

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?