'ascent-light-video', 'description' => __('A simple video widget that makes it easy to add responsive videos ', 'ascent-light') ); $control_ops = array( 'width' => 300, 'height' => 350, 'id_base' => 'ascent-light-video-widget' ); parent::__construct( 'ascent-light-video-widget', __('Themeora Video Widget', 'ascent-light'), $widget_ops, $control_ops ); } function widget( $args, $instance ) { extract( $args ); $title = apply_filters('widget_title', $instance['title'] ); $url = $instance['url']; echo $before_widget; if ( $title ) echo $before_title . esc_html( $title ) . $after_title; if ( $url ) echo '
'; echo $after_widget; } function update( $new_instance, $old_instance ) { $instance = $old_instance; //Strip tags from title and name to remove HTML $instance['title'] = strip_tags( $new_instance['title'] ); $instance['url'] = $new_instance['url']; return $instance; } function form($instance) { //Set up some default widget settings. $defaults = array('title' => __('', 'ascent-light'), 'url' => __('', '')); $instance = wp_parse_args((array) $instance, $defaults); ?>