'themeora-video', 'description' => __('A simple video widget that makes it easy to add responsive videos ', THEMEORA_THEME_NAME) ); $control_ops = array( 'width' => 300, 'height' => 350, 'id_base' => 'themeora-video-widget' ); $this->WP_Widget( 'themeora-video-widget', __('themeora Video Widget', THEMEORA_THEME_NAME), $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 '
'. $url . '
'; 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' => __('', THEMEORA_THEME_NAME), 'url' => __('', THEMEORA_THEME_NAME)); $instance = wp_parse_args( (array) $instance, $defaults ); ?>