diff options
author | Anthony G. Basile <blueness@gentoo.org> | 2018-06-08 10:09:24 -0400 |
---|---|---|
committer | Anthony G. Basile <blueness@gentoo.org> | 2018-06-08 10:09:24 -0400 |
commit | a6b006c0f1ef757f23375f7906193370337d8bd7 (patch) | |
tree | 4467c6423b2c54e6ef8c3e79241a833fb17833a5 /plugins/jetpack/modules/carousel/jetpack-carousel.php | |
parent | Update akismet 4.0.7 (diff) | |
download | blogs-gentoo-a6b006c0f1ef757f23375f7906193370337d8bd7.tar.gz blogs-gentoo-a6b006c0f1ef757f23375f7906193370337d8bd7.tar.bz2 blogs-gentoo-a6b006c0f1ef757f23375f7906193370337d8bd7.zip |
Update jetpack 6.2
Diffstat (limited to 'plugins/jetpack/modules/carousel/jetpack-carousel.php')
-rw-r--r-- | plugins/jetpack/modules/carousel/jetpack-carousel.php | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/plugins/jetpack/modules/carousel/jetpack-carousel.php b/plugins/jetpack/modules/carousel/jetpack-carousel.php index 6b76fb0e..1fb4394b 100644 --- a/plugins/jetpack/modules/carousel/jetpack-carousel.php +++ b/plugins/jetpack/modules/carousel/jetpack-carousel.php @@ -398,6 +398,10 @@ class Jetpack_Carousel { function add_data_to_images( $attr, $attachment = null ) { $attachment_id = intval( $attachment->ID ); + if ( ! wp_attachment_is_image( $attachment_id ) ) { + return $attr; + } + $orig_file = wp_get_attachment_image_src( $attachment_id, 'full' ); $orig_file = isset( $orig_file[0] ) ? $orig_file[0] : wp_get_attachment_url( $attachment_id ); $meta = wp_get_attachment_metadata( $attachment_id ); |