[wp-trac] Re: [WordPress Trac] #6812: Image captions

WordPress Trac wp-trac at lists.automattic.com
Wed Jul 2 11:07:14 GMT 2008


#6812: Image captions
----------------------------+-----------------------------------------------
 Reporter:  matt            |        Owner:  azaozz
     Type:  enhancement     |       Status:  new   
 Priority:  normal          |    Milestone:  2.6   
Component:  Administration  |      Version:  2.5   
 Severity:  normal          |   Resolution:        
 Keywords:  has-patch       |  
----------------------------+-----------------------------------------------
Changes (by azaozz):

  * keywords:  => has-patch

Comment:

 Support for image captions, first run. Uses shortcode around the img tag
 for the caption's settings, so
 <img/> or <a><img /></a>
 becomes
 {{{
 [wp_caption]<a><img /></a>[/wp_caption]
 }}}

 This way seems most compatible and at the same time futureproof. Any king
 of tags can be generated while processing the shortcode, or if captions
 are not needed, the shortcode can be filtered out and the default tag(s)
 returned.

 Currently the captions are rendered similarly to the gallery page:

 {{{
 <dl>
 <dt><a><img /></a></dt>
 <dd>caption text</dd>
 </dl>
 }}}

 This is supported in both TinyMCE and on the blog. All images that have
 alt text (attachment excerpt) will have captions when inserted in the
 editor. Also while editing older posts, if the images are edited and have
 alt text, the caption will be added. To stop showing caption for an image,
 the caption text should be deleted while editing the image (with the new
 popup), or the shortcode can be deleted from the HTML editor.

-- 
Ticket URL: <http://trac.wordpress.org/ticket/6812#comment:2>
WordPress Trac <http://trac.wordpress.org/>
WordPress blogging software


More information about the wp-trac mailing list