| 73 | | ?> |
| | 73 | /** |
| | 74 | * Retrieve Post Thumbnail URL. |
| | 75 | * |
| | 76 | * @param int $post_id Optional. Post ID. |
| | 77 | * @param string $size Optional. Image size. Defaults to 'post-thumbnail'. |
| | 78 | */ |
| | 79 | function get_the_post_thumbnail_src( $post_id = NULL, $size = 'post-thumbnail' ) { |
| | 80 | $post_id = ( NULL === $post_id ) ? get_the_ID() : $post_id; |
| | 81 | $post_thumbnail_id = get_post_thumbnail_id( $post_id ); |
| | 82 | |
| | 83 | if ( $post_thumbnail_id ) { |
| | 84 | $size = apply_filters( 'post_thumbnail_size', $size ); |
| | 85 | list( $src ) = wp_get_attachment_image_src( $post_thumbnail_id, $size ); |
| | 86 | } else { |
| | 87 | $src = false; |
| | 88 | } |
| | 89 | |
| | 90 | return apply_filters( 'post_thumbnail_src', $src, $post_id, $post_thumbnail_id, $size, $icon ); |
| | 91 | } |
| | 92 | |