Skip to content

Commit

Permalink
Slideshow widget: Add check for zero images
Browse files Browse the repository at this point in the history
  • Loading branch information
cathyjf authored and Tony Kovanen committed Aug 27, 2014
1 parent 15ff47c commit 469f10b
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions modules/widgets/gallery.php
Original file line number Diff line number Diff line change
Expand Up @@ -215,6 +215,9 @@ public function slideshow_widget( $args, $instance ) {
if ( ! class_exists( 'Jetpack_Slideshow_Shortcode' ) )
return;

if ( count( $instance['attachments'] ) < 1 )
return;

$slideshow = new Jetpack_Slideshow_Shortcode();

$slideshow->enqueue_scripts();
Expand Down

0 comments on commit 469f10b

Please sign in to comment.