'athemes_video_widget', 'description' => __( 'Display a video from Youtube, Vimeo etc.', 'talon') ); parent::__construct(false, $name = __('Talon: Video', 'talon'), $widget_ops); $this->alt_option_name = 'athemes_video_widget'; } public function form($instance) { $title = isset( $instance['title'] ) ? esc_attr( $instance['title'] ) : ''; $url = isset( $instance['url'] ) ? esc_url( $instance['url'] ) : ''; $width = isset( $instance['width'] ) ? absint( $instance['width'] ) : '800'; ?>

id; } $title = ( ! empty( $instance['title'] ) ) ? $instance['title'] : ''; $title = apply_filters( 'widget_title', $title, $instance, $this->id_base ); $url = isset( $instance['url'] ) ? esc_url( $instance['url'] ) : ''; $width = isset( $instance['width'] ) ? absint( $instance['width'] ) : '800'; echo $args['before_widget']; if ( $title ) echo $args['before_title'] . $title . $args['after_title']; if( ($url) ) { echo '
'; echo wp_oembed_get($url); echo '
'; } echo $args['after_widget']; } }