Example #1
0
 /**
  * Generate HTML for a circular (grid style) Widget
  *
  * @param array $args Display arguments including before_title, after_title, before_widget, and after_widget.
  * @param array $instance The Widget instance to generate HTML for
  * @return string String of HTML representing a circular gallery
  */
 public function circle_widget($args, $instance)
 {
     if (!class_exists('Jetpack_Tiled_Gallery')) {
         return;
     }
     $widget_tiled_gallery = new Jetpack_Tiled_Gallery();
     // Tell the Tiled_Gallery what we want the images to link to
     $widget_tiled_gallery->set_atts(array('link' => $instance['link'], 'type' => 'circle'));
     $widget_tiled_gallery->default_scripts_and_styles();
     $html = $widget_tiled_gallery->circle_talavera($instance['attachments']);
     return $html;
 }