Changeset 15549 for trunk/wp-includes/post-thumbnail-template.php
- Timestamp:
- 08/28/2010 11:57:28 AM (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-includes/post-thumbnail-template.php
r15355 r15549 19 19 */ 20 20 function has_post_thumbnail( $post_id = NULL ) { 21 global $id; 22 $post_id = ( NULL === $post_id ) ? $id : $post_id; 21 $post_id = ( NULL === $post_id ) ? get_the_ID() : $post_id; 23 22 return !! get_post_thumbnail_id( $post_id ); 24 23 } … … 33 32 */ 34 33 function get_post_thumbnail_id( $post_id = NULL ) { 35 global $id; 36 $post_id = ( NULL === $post_id ) ? $id : $post_id; 34 $post_id = ( NULL === $post_id ) ? get_the_ID() : $post_id; 37 35 return get_post_meta( $post_id, '_thumbnail_id', true ); 38 36 } … … 60 58 */ 61 59 function get_the_post_thumbnail( $post_id = NULL, $size = 'post-thumbnail', $attr = '' ) { 62 global $id; 63 $post_id = ( NULL === $post_id ) ? $id : $post_id; 60 $post_id = ( NULL === $post_id ) ? get_the_ID() : $post_id; 64 61 $post_thumbnail_id = get_post_thumbnail_id( $post_id ); 65 62 $size = apply_filters( 'post_thumbnail_size', $size );
Note: See TracChangeset
for help on using the changeset viewer.