self::CLASS_NAME, 'customize_selective_refresh' => true, 'description' => __( 'Videos and embeds from YouTube, SlideShare, Spotify, and more.', 'adapter-responsive-video' ), ) ); } /** * Outputs the widget form. * * @param array $instance Widget data. * @return void */ public function form( $instance ) { $video_url = isset( $instance[ self::VIDEO_URL_KEY ] ) ? $instance[ self::VIDEO_URL_KEY ] : ''; ?>

get_iframe_attributes( $raw_embed_markup ); $instance['video_source'] = $iframe_attributes['src']; $instance['aspect_ratio_class'] = $iframe_attributes['class']; $has_iframe = preg_match( '/^ aspect ratio class and src. * * The aspect ratio class is based on whether its ratio is closer to 4/3 or 16/9. * It will either be 'embed-responsive-16by9', 'embed-responsive-4by3', or null. * The 'src' is simply the src of the