Opened 11 years ago
Closed 11 years ago
#23965 closed defect (bug) (fixed)
Caption not showing in Post Format Image
Reported by: | RDall | Owned by: | markjaquith |
---|---|---|---|
Milestone: | 3.6 | Priority: | normal |
Severity: | normal | Version: | 3.6 |
Component: | Post Formats | Keywords: | has-patch commit |
Focuses: | Cc: |
Description
After testing the latest version of Twenty Thirteen there has been many improvements Most of which I am very happy to see. But not having the caption below the image of post-format image is a poor design decision. Here is why:
I can see many post the WordPress support forum asking why the captions can't be seen. For example this one: http://wordpress.org/support/topic/twenty-thirteen-image-post-image-doesnt-use-title-alt
If the user decides not to have a caption below there image. Let it be their choice. But asking for a caption in the upload portion of the site and then not displaying is counter intuitive.
I know I might be new to these parts (Trac and WordPress Development in general) But after 7 years as a professional photographer and then another 5 years as a web developer. I implore you to reverse this decision and the confusion it will surely and has already caused.
You could says… Yes that can be added a child theme… And I could do that… But that is not the reason for this request… It is for the large number of people who will think this is a bug, or they did something wrong or will make a frustrated posts to the forums. I am try the prevent that…
Attachments (12)
Change History (37)
#1
in reply to:
↑ description
;
follow-up:
↓ 2
@
11 years ago
#2
in reply to:
↑ 1
@
11 years ago
Replying to nacin:
I imagine there have been previous discussions on this, somewhere?
I did check the Alpha / Beta Forum and did a search for captions in trac tickets before posting a new ticket. If there was a IRC chat regarding this subject I wasn't available to attended it.
#3
@
11 years ago
- Cc dailyrants@… added
Does this work with any theme in 3.6? I don't see that the caption is being saved in the post content anywhere with image format posts, and I don't see the caption showing up in other themes I'm trying.
#4
follow-up:
↓ 7
@
11 years ago
I'm reasonably certain hiding the caption wasn't intentional in the context of displaying it in the image format's content.
In Twenty Thirteen we're essentially using the_post_format_image()
as a replacement for the_post_thumbnail()
for image formats. If an image is present in the image format meta, all that gets passed back is the marked-up image (above the title). Unfortunately, this also applies to what gets displaying in the image format's content (below the title).
If Joen/Lancewillett only want the caption to show on the image format's content, that's fine but we need to differentiate that in get_the_post_format_image()
.
#5
@
11 years ago
This ticket probably needs to be reassigned to another component, and IMO, dealt with before 3.6 goes live.
The new posts formats UI doesn't do what the "Add Media" workflow did/does. That workflow inserts to html into the post_content field, wrapping the image in the caption shortcode.
The new UI appears to be using the post's meta_key value in wp_postmeta to reference the image attached. This means all existing themes will not show the caption data, without some sort of modification, on new posts using the image format.
This also means that users who have been doing posts of the image format will not get the same functionality they did before 3.6.
#6
@
11 years ago
- Component changed from Bundled Theme to Post Formats
- Summary changed from Return Caption to display under Post Format Image to Caption not showing in Post Format Image
- Type changed from feature request to defect (bug)
#7
in reply to:
↑ 4
@
11 years ago
Replying to DrewAPicture:
I'm reasonably certain hiding the caption wasn't intentional in the context of displaying it in the image format's content.
Okay that was my mis-understanding from http://wordpress.org/support/topic/twenty-thirteen-image-post-image-doesnt-use-title-alt#post-4057561
In Twenty Thirteen we're essentially using
the_post_format_image()
as a replacement forthe_post_thumbnail()
for image formats. If an image is present in the image format meta, all that gets passed back is the marked-up image (above the title). Unfortunately, this also applies to what gets displaying in the image format's content (below the title).
If Joen/Lancewillett only want the caption to show on the image format's content, that's fine but we need to differentiate that in
get_the_post_format_image()
.
I'd still disagree that single image absolutely needs a caption IMHO.
I have changed this ticket to from feature request to defect (bug) and from Bundled Theme to Post Formats as it seems from mindctrl comments it more a bug with 3.6 then it is with twenty-thirteen
#8
@
11 years ago
I expressed this concern with the switch back to a meta field for the image. Using the content area may be less intuitive, but there are lots of limitations to using a meta field that only accepts an attachment ID.
#9
@
11 years ago
yeah, I am looking at this right now, meta field needs to be able to take whatever (ID, URL, shortcode, HTML) like audio / video do
#10
@
11 years ago
Related: ticket:19570:137
#11
@
11 years ago
this from #23831 needs to go in first: 23831.2.diff, so the JS doesn't have to contort twice - I assumed that patch was going in before beta 1, still not committed
#12
@
11 years ago
the tl;dr of what the eventual patch will be: ID will work, but it is not what we will insert into the meta field. Meta field will contain URL or <img>
, or HTML if it is linked, or shortcode if it is wrapped in caption. All of those things already work for audio / video in the same fashion. Also, when we are doing get_the_post_format_image()
, $post->format_content
will be the <img>
, the <a><img>
or the shortcode (parsed into HTML) found in the content. This means we have to reboot the JS for image in post-formats.js
which I made changes to already to support dimensions and shortcodes for video in the above mentioned patch.
#14
follow-up:
↓ 15
@
11 years ago
- Cc lancewillett added
I think it's valid for a theme to output the caption text as part of the "image from Image post format" -- the way @wonderboymusic describes above, as part of the parsed HTML caption.
The way I think of it is, this is the same HTML output that the Media tools would add to the post content when not using the Image post format. Could be just an image element with attributes, could be wrapped in an anchor, and could be a caption shortcode.
#15
in reply to:
↑ 14
@
11 years ago
Replying to lancewillett:
I think it's valid for a theme to output the caption text as part of the "image from Image post format" -- the way @wonderboymusic describes above, as part of the parsed HTML caption.
The way I think of it is, this is the same HTML output that the Media tools would add to the post content when not using the Image post format. Could be just an image element with attributes, could be wrapped in an anchor, and could be a caption shortcode.
That sounds like a great idea Lance…
Can I chalk my confusion on the hiding the caption as my Jumping on the couch on Oprah moment?
#16
@
11 years ago
- Keywords needs-patch added
@wonderboymusic Were you working on a patch for this? Happy to test.
#17
@
11 years ago
- Keywords has-patch added; needs-patch removed
Ready for testing 23965.diff
Note: I didn't do the thing where I change the meta to act like audio / video
#20
@
11 years ago
- Keywords needs-unit-tests added
I'm going to make sure these funcs have Unit Tests
#21
@
11 years ago
In 1262/tests:
#22
@
11 years ago
- Keywords needs-unit-tests removed
23965.5.diff makes all new Unit Tests pass. Need to write more unit tests for Post Format funcs to make sure get_tag_regex()
remains stable
#23
@
11 years ago
23965.6.diff includes Sergey's code from 24147.patch to make this work in other themes.
#24
@
11 years ago
23965.7.diff alters some code based on Unit Tests for get_embedded_media()
- confirms that get_tag_regex()
works as expected based on these changes
I imagine there have been previous discussions on this, somewhere?
Replying to RDall:
I would tend to agree.