| 76 | /** |
| 77 | * Retrieve Post Thumbnail Data. |
| 78 | * |
| 79 | * |
| 80 | * @param int $post_id Optional. Post ID. |
| 81 | * @param string $size Optional. Image size. Defaults to 'thumbnail'. |
| 82 | * @param bool $icon Optional, default is false. Whether it is an icon. |
| 83 | */ |
| 84 | function get_the_post_thumbnail_src( $post_id = NULL, $size = 'post-thumbnail', $icon = false ) { |
| 85 | global $id; |
| 86 | $post_id = ( NULL === $post_id ) ? $id : $post_id; |
| 87 | $post_thumbnail_id = get_post_thumbnail_id( $post_id ); |
| 88 | $size = apply_filters( 'post_thumbnail_size', $size ); |
| 89 | if ( $post_thumbnail_id ) { |
| 90 | list($src) = wp_get_attachment_image_src( $post_thumbnail_id, $size, $icon ); |
| 91 | } else { |
| 92 | $src = false; |
| 93 | } |
| 94 | return apply_filters( 'post_thumbnail_src', $src, $post_id, $post_thumbnail_id, $size, $icon ); |
| 95 | } |
| 96 | |