Changeset 47160 for trunk/src/wp-includes/post-thumbnail-template.php
- Timestamp:
- 02/02/2020 03:06:31 AM (5 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/post-thumbnail-template.php
r45739 r47160 46 46 * 47 47 * @param int|WP_Post $post Optional. Post ID or WP_Post object. Default is global `$post`. 48 * @return string|int Post thumbnail ID or empty string.48 * @return int|string Post thumbnail ID or empty string if the post does not exist. 49 49 */ 50 50 function get_post_thumbnail_id( $post = null ) { … … 53 53 return ''; 54 54 } 55 return get_post_meta( $post->ID, '_thumbnail_id', true );55 return (int) get_post_meta( $post->ID, '_thumbnail_id', true ); 56 56 } 57 57
Note: See TracChangeset
for help on using the changeset viewer.