Created
October 6, 2015 17:14
-
-
Save brentfincham/58fed1a399576645dd4a 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
//* 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