Skip to content

Instantly share code, notes, and snippets.

@brentfincham
Created October 6, 2015 17:14
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save brentfincham/58fed1a399576645dd4a to your computer and use it in GitHub Desktop.
Save brentfincham/58fed1a399576645dd4a to your computer and use it in GitHub Desktop.
//* 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