Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
//* Add featured-section body class for front-page-1 widget area
if ( is_active_sidebar( 'front-page-1' ) ) {
//* Add image-section-start body class
add_filter( 'body_class', 'altitude_featured_body_class_1' );
function altitude_featured_body_class_1( $classes ) {
$classes[] = 'featured-section';
return $classes;
}
//* Enqueue BigVideo on non-handhelds
if ( wp_is_mobile() ) {
return;
}
wp_enqueue_script( 'video-js', get_bloginfo( 'stylesheet_directory' ) . '/js/video.js', '', '', true );
wp_enqueue_style( 'bigvideo-css', get_bloginfo( 'stylesheet_directory' ) . '/css/bigvideo.css' );
wp_enqueue_script( 'bigvideo', get_bloginfo( 'stylesheet_directory' ) . '/js/bigvideo.js', array( 'video-js', 'jquery' ), '', true );
wp_enqueue_script( 'bigvideo-init', get_stylesheet_directory_uri() . '/js/bigvideo-init.js', array( 'bigvideo' ), '1.0.0', true );
}
//* Add featured-section body class for front-page-3 widget area
if ( is_active_sidebar( 'front-page-3' ) ) {
//* Add image-section-start body class
add_filter( 'body_class', 'altitude_featured_body_class_3' );
function altitude_featured_body_class_3( $classes ) {
$classes[] = 'featured-section';
return $classes;
}
//* Enqueue BigVideo on non-handhelds
if ( wp_is_mobile() ) {
return;
}
wp_enqueue_script( 'video-js', get_bloginfo( 'stylesheet_directory' ) . '/js/video.js', '', '', true );
wp_enqueue_style( 'bigvideo-css', get_bloginfo( 'stylesheet_directory' ) . '/css/bigvideo.css' );
wp_enqueue_script( 'bigvideo', get_bloginfo( 'stylesheet_directory' ) . '/js/bigvideo.js', array( 'video-js', 'jquery' ), '', true );
wp_enqueue_script( 'bigvideo-init', get_stylesheet_directory_uri() . '/js/bigvideo-init.js', array( 'bigvideo' ), '1.0.0', true );
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.