[wp-trac] [WordPress Trac] #11394: Image shortcode
WordPress Trac
wp-trac at lists.automattic.com
Fri Apr 9 19:37:37 UTC 2010
#11394: Image shortcode
-----------------------------+----------------------------------------------
Reporter: caesarsgrunt | Owner:
Type: feature request | Status: new
Priority: normal | Milestone: 3.1
Component: Media | Version: 2.9
Severity: normal | Keywords: needs-patch dev-feedback
-----------------------------+----------------------------------------------
Comment(by mikeschinkel):
Replying to [comment:48 nacin]:
> This seems more like a conversation better served as a wp-hackers
thread, not a Trac ticket (and I don't mean that in a disparaging way).
It's just a better venue to discuss these opinions. Trac should be for
code, not discussions on the theory/idea.
>
> Let's leave this one open until 3.1 scope discussions are held, and if
there's no traction for an image shortcode when media/upload is presumably
on the table, we can wontfix this.
Point taken.
Replying to [comment:45 Otto42]:
> Look, I'll give you an example. This code will find all img tags in a
post and parse them, then spit out their src and class.
>
> global $post;
> if ( preg_match_all('/<img (.+?)>/', $post->post_content, $matches) ) {
> foreach ($matches[1] as $match) {
> foreach ( wp_kses_hair($match, array('http')) as $attr)
> echo $img['src'];
> echo $img['class'];
> }
> }
> }
I know this is off-topic (forgive me please) but I've both studied and
looked for documentation for KSES but to no avail. I think there is great
functionality that many WP developers could use but the lack of docs or
blog posts on the subject tell me almost nobody understands how to use it
other than you and a few others.
Any chance you'd go to the effort to do a KSES tutorial on your blog?
Thanks in advance...
--
Ticket URL: <http://core.trac.wordpress.org/ticket/11394#comment:53>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software
More information about the wp-trac
mailing list