diff --git src/wp-includes/post-thumbnail-template.php src/wp-includes/post-thumbnail-template.php
index c20e2df..9bda89d 100644
|
|
|
function has_post_thumbnail( $post = null ) { |
| 36 | 36 | * @return string|int Post thumbnail ID or empty string. |
| 37 | 37 | */ |
| 38 | 38 | function get_post_thumbnail_id( $post = null ) { |
| 39 | | $post = get_post( $post ); |
| 40 | | if ( ! $post ) { |
| 41 | | return ''; |
| | 39 | if ( ! is_numeric( $post ) ) { |
| | 40 | $post = get_post( $post ); |
| | 41 | |
| | 42 | if ( ! $post ) { |
| | 43 | return ''; |
| | 44 | } |
| | 45 | |
| | 46 | $post_id = $post->ID; |
| | 47 | } else { |
| | 48 | $post_id = $post; |
| 42 | 49 | } |
| 43 | | return get_post_meta( $post->ID, '_thumbnail_id', true ); |
| | 50 | |
| | 51 | return get_post_meta( $post_id, '_thumbnail_id', true ); |
| 44 | 52 | } |
| 45 | 53 | |
| 46 | 54 | /** |