-
-
Save billerickson/404e67453bb5610c588cc12d846cc738 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* YouTube Gallery | |
* | |
* @package CoreFunctionality | |
* @author Bill Erickson | |
* @since 1.0.0 | |
* @license GPL-2.0+ | |
**/ | |
/** | |
* Youtube Gallery | |
*/ | |
function ea_youtube_gallery_shortcode() { | |
$output = '<div class="youtube-gallery">'; | |
// Video Player | |
$output .= '<div class="youtube-gallery--player">'; | |
$output .= '<h4>Video goes here</h4>'; | |
$output .= '</div>'; | |
// Video Listing | |
$output .= '<div class="youtube-gallery--listing">'; | |
for( $i = 0; $i < 24; $i++ ) { | |
$class = 0 == $i ? 'item active' : 'item'; | |
$output .= '<a href="#main-content" class="' . $class . '">'; | |
$output .= '<span class="title">thumbnail goes here</span>'; | |
$output .= '</a>'; | |
} | |
$output .= '</div>'; | |
$output .= '</div>'; | |
return $output; | |
} | |
add_shortcode( 'ea_youtube_gallery', 'ea_youtube_gallery_shortcode' ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment