[wp-trac] [WordPress Trac] #23593: Add functions to extract the first image from content, [gallery] a post, or an arbitrary string

WordPress Trac noreply at wordpress.org
Sat Feb 23 00:07:42 UTC 2013


#23593: Add functions to extract the first image from content, [gallery] a post, or
an arbitrary string
----------------------------+-------------------------
 Reporter:  wonderboymusic  |       Type:  enhancement
   Status:  new             |   Priority:  normal
Milestone:  3.6             |  Component:  General
  Version:                  |   Severity:  normal
 Keywords:  has-patch       |
----------------------------+-------------------------
 = Scenarios

 A post has a post format of Image, but the current theme does not support
 the Image post format but:
 - There's a gallery shortcode in the content and you want the first image
 - There are images attached to the post and you want the first one
 - There is an image tag as the content or in the content and you want the
 src
 - The content is a URL representing an image
 - The content is a URL representing an image, followed by new line(s),
 followed by commentary

 Introduce `the_image()`, `get_the_image( $post_id = 0 )`,
 `get_content_image( &$content, $remove = false )`, `get_post_images(
 $post_id = 0 )`

-- 
Ticket URL: <http://core.trac.wordpress.org/ticket/23593>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software


More information about the wp-trac mailing list