Changeset 12320
- Timestamp:
- 12/03/2009 03:59:27 PM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-includes/post-image-template.php
r12211 r12320 10 10 */ 11 11 12 /** 13 * Check if post has an image attached. 14 * 15 * @since 2.9.0 16 * 17 * @param int $post_id Optional. Post ID. 18 * @return bool Whether post has an image attached (true) or not (false). 19 */ 12 20 function has_post_image( $post_id = NULL ) { 13 21 global $id; … … 16 24 } 17 25 26 /** 27 * Retrieve Post Image ID. 28 * 29 * @since 2.9.0 30 * 31 * @param int $post_id Optional. Post ID. 32 * @return int 33 */ 18 34 function get_post_image_id( $post_id = NULL ) { 19 35 global $id; … … 22 38 } 23 39 40 /** 41 * Display Post Image. 42 * 43 * @since 2.9.0 44 * 45 * @param int $size Optional. Image size. Defaults to 'thumbnail'. 46 * @param string|array $attr Optional. Query string or array of attributes. 47 */ 24 48 function the_post_image( $size = 'thumbnail', $attr = '' ) { 25 49 echo get_the_post_image( NULL, $size, $attr ); 26 50 } 27 51 52 /** 53 * Retrieve Post Image. 54 * 55 * @since 2.9.0 56 * 57 * @param int $post_id Optional. Post ID. 58 * @param string $size Optional. Image size. Defaults to 'thumbnail'. 59 * @param string|array $attr Optional. Query string or array of attributes. 60 */ 28 61 function get_the_post_image( $post_id = NULL, $size = 'thumbnail', $attr = '' ) { 29 62 global $id;
Note: See TracChangeset
for help on using the changeset viewer.