[wp-trac] [WordPress Trac] #24289: Post Formats UI: Attachment Display Settings ignored when inserting image.
WordPress Trac
noreply at wordpress.org
Mon May 13 19:30:36 UTC 2013
#24289: Post Formats UI: Attachment Display Settings ignored when inserting image.
------------------------------------------------------+--------------------
Reporter: jbobich | Owner:
Type: defect (bug) | Status: new
Priority: high | Milestone: 3.6
Component: Administration | Version: trunk
Severity: blocker | Resolution:
Keywords: has-patch dev-feedback reporter-feedback |
------------------------------------------------------+--------------------
Comment (by kovshenin):
I think inserting a custom HTML block for images is overkill, especially
because of the fact that `get_the_post_format_image` will try to turn
whatever markup there is into an attachment ID (which is extra work), and
if it succeeds, everything else is thrown away (click-through links,
sizes, classes, etc.) and the image is rendered with
`wp_get_attachment_image`.
I'm not entirely sure, but I think HTML support was brought in for two
reasons (someone can correct me):
* Captions support
* URLs support
For URLs, we can either sideload the image (brings the benefit of sizing
and cropping) or just display as is (simpler and faster).
For captions it's slightly trickier. There used to be a dedicated caption
field, just like a URL, but that's confusing, because there already is a
working caption field in the media modal which inserts the [caption]
shortcode.
The caption text is saved with the attachment post (not the regular post)
so there's a benefit of inserting it into the editor (or meta) - you can
have the same image twice but with a different caption. Otherwise a
changed caption may affect existing posts, which is currently the case
with galleries.
Since "attaching an image to a post" is no longer a key concept after the
3.5 media change, I think the caption should stay with the image, not the
post, though that has other disadvantages too, like not being able to
search the caption text.
Overall, I think it would be a good idea to remove the HTML textarea for
image post formats, use numeric IDs or URL strings in meta, use the
caption field to render captions, and bring back the "Insert from URL"
menu in the media modal.
--
Ticket URL: <http://core.trac.wordpress.org/ticket/24289#comment:13>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software
More information about the wp-trac
mailing list