Exemplo n.º 1
0
 /**
  * Sanitize widget form values as they are saved.
  *
  * @see WP_Widget::update()
  *
  * @param array $new_instance Values just sent to be saved.
  * @param array $old_instance Previously saved values from database.
  *
  * @return array Updated safe values to be saved.
  */
 public function update($new_instance, $old_instance)
 {
     $instance = array();
     $instance['title'] = !empty($new_instance['title']) ? strip_tags($new_instance['title']) : '';
     $instance['slider'] = get_simple_responsive_slider();
     return $instance;
 }
function simpleresponsiveslider_shortcode()
{
    // Make sure we buffer our output
    ob_start();
    $html = get_simple_responsive_slider();
    $output = ob_get_clean();
    return $html . $output;
}