Change Youtube Shortcode
-
Hello.
try to add a new shortcode, but more that you register in class.shortcodes and class.data not shown so modify the code of the youtube to show me the picture and a video link with pirobox this the modified code
$return[]
with this
` // Prepare autoplay
$autoplay = ( $atts[‘autoplay’] === ‘yes’ ) ? ‘&autoplay=1’ : ”;
// Create player
/*
$return[] = ‘<div class=”su-youtube su-responsive-media-‘ . $atts[‘responsive’] . su_ecssc( $atts ) . ‘”>’;
$return[] = ‘<iframe width=”‘ . $atts[‘width’] . ‘” height=”‘ . $atts[‘height’] . ‘” src=”https://www.youtube.com/embed/’ . $id . $autoplay . ‘” frameborder=”0″ allowfullscreen=”true”></iframe>’;
$return[] = ‘</div>’; */Shortcodes_Ultimate_Assets::add( ‘css’, ‘su-media-shortcodes’ );
// Return result
// return implode( ”, $return );
return ‘<div class=”su-custom-gallery-slide”>
<img alt=”” src=”https://img.youtube.com/vi/’ . $id . ‘/2.jpg” width=”90″ height=”90″ /><span class=”su-custom-gallery-title”>’ . $atts[‘class’] . ‘</span></div>’;use the html code of the galleries
excuse my English
- The topic ‘Change Youtube Shortcode’ is closed to new replies.