/** * Widget frontend * * @param array $args * @param array $instance */ public function widget($args, $instance) { $title = apply_filters('widget_title', $instance['title']); /* Before and after widget arguments are usually modified by themes */ echo $args['before_widget']; if (!empty($title)) { echo $args['before_title'] . $title . $args['after_title']; } /* Widget output here */ echo owl_function(array('category' => get_term_by('id', $instance['category'], 'Carousel'), 'items' => $instance['items'])); /* After widget */ echo $args['after_widget']; }
public function widget($args, $instance) { extract($args); $title = apply_filters('widget_title', $instance['title']); echo $before_widget; if (!empty($title)) { echo $before_title . $title . $after_title; } echo owl_function(array(category => $instance['category'], singleItem => "true", autoPlay => "true", pagination => "false")); echo $after_widget; }