function render_gallery($id, $attributes = array()) { if (!$id) { return; } ob_start(); awesome_gallery($id, $attributes); return ob_get_clean(); }
function widget($args, $instance) { extract($args); $title = apply_filters('widget_title', empty($instance['title']) ? '' : $instance['title'], $instance, $this->id_base); echo $before_widget; if (!empty($title)) { echo $before_title . $title . $after_title; } echo awesome_gallery($instance['id']); echo $after_widget; }