[wp-trac] [WordPress Trac] #22960: Add functions to extract images from content, attached to post, [gallery], or arbitrary string
WordPress Trac
noreply at wordpress.org
Fri Mar 15 09:57:28 UTC 2013
#22960: Add functions to extract images from content, attached to post, [gallery],
or arbitrary string
-------------------------------------------------+-------------------------
Reporter: kcssm | Owner:
Type: defect (bug) | Status: reopened
Priority: normal | Milestone: 3.6
Component: Post Formats | Version: 3.5
Severity: normal | Resolution:
Keywords: needs-codex has-patch needs-unit- |
tests |
-------------------------------------------------+-------------------------
Comment (by DrewAPicture):
Reiterating from [comment:ticket:23572:8] and [comment:ticket:23282:49],
it seems like there's a lot of duplicated code in these `get_content_*`
functions. Had you considered a more generic approach such as maybe
`get_content_media( 'audio|video|link|url|etc' )`? We should be careful
about creating specifically-named getters because we'd lock ourselves into
the pattern of having to create brand new functions for every new kind of
supported media.
Also happy to contribute with patch(es) :).
--
Ticket URL: <http://core.trac.wordpress.org/ticket/22960#comment:37>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software
More information about the wp-trac
mailing list