getShortcode(), $atts ); extract( $atts ); if ( '' === $link ) { return null; } $el_class = $this->getExtraClass( $el_class ); $video_w = 500; $video_h = $video_w / 1.61; //1.61 golden ratio /** @var WP_Embed $wp_embed */ global $wp_embed; $embed = ''; if ( is_object( $wp_embed ) ) { $embed = $wp_embed->run_shortcode( '[embed width="' . $video_w . '"' . $video_h . ']' . $link . '[/embed]' ); } $el_classes = array( 'wpb_video_widget', 'wpb_content_element', 'vc_clearfix', $el_class, vc_shortcode_custom_css_class( $css, ' ' ), 'vc_video-aspect-ratio-' . esc_attr( $el_aspect ), 'vc_video-el-width-' . esc_attr( $el_width ), 'vc_video-align-' . esc_attr( $align ), ); $css_class = implode( ' ', $el_classes ); $css_class = apply_filters( VC_SHORTCODE_CUSTOM_CSS_FILTER_TAG, $css_class, $this->getShortcode(), $atts ); $output = '
' . wpb_widget_title( array( 'title' => $title, 'extraclass' => 'wpb_video_heading', ) ) . '
' . $embed . '
'; echo $output;