This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<php | |
// Rewrite of "get_the_post_thumbnail" for compatibility with jQuery LazyLoad plugin | |
function my_get_the_post_lazyload_thumbnail( $post_id = false, $size = 'full' ) { | |
if ( $post_id ) { | |
// Get the id of the attachment | |
$attachment_id = get_post_thumbnail_id( $post_id ); | |
if ( $attachment_id ) { | |
$src = wp_get_attachment_image_src( $attachment_id, $size ); | |
if ($src) { | |
$img = get_the_post_thumbnail( $post_id, $size, array( |