'', 'api_params' => '', 'autoplay' => "false", 'center' => 'no', 'height' => 360, 'id' => '', 'width' => 600 ), $args ); extract( $defaults ); self::$args = $defaults ; if( $autoplay == 'true' || $autoplay == 'yes' ) { $autoplay = '&autoplay=1'; } else { $autoplay = ''; } if( is_ssl() ) { $protocol = 'https'; } else { $protocol = 'http'; } $html = sprintf( '
', FusionCore_Plugin::attributes( 'youtube-shortcode' ), FusionCore_Plugin::attributes( 'youtube-shortcode-video-sc' ), $protocol, $id, $autoplay, $api_params, $width, $height ); return $html; } function attr() { $attr = array(); $attr['class'] = 'fusion-video fusion-youtube'; if( self::$args['center'] == 'yes' ) { $attr['class'] .= ' center-video'; } else { $attr['style'] = sprintf( 'max-width:%spx;max-height:%spx;', self::$args['width'], self::$args['height'] ); } if( self::$args['class'] ) { $attr['class'] .= ' ' . self::$args['class']; } return $attr; } function video_sc_attr() { $attr = array(); $attr['class'] = 'video-shortcode'; if( self::$args['center'] == 'yes' ) { $attr['style'] = sprintf( 'max-width:%spx;max-height:%spx;', self::$args['width'], self::$args['height'] ); } return $attr; } } new FusionSC_Youtube();