-
-
Save kristarella/32d37594520ee26fe1ae 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 | |
// Enqueue CSS | |
function load_cornerstone_css() { | |
wp_enqueue_style( | |
'cornerstone_child_css', | |
get_stylesheet_directory_uri() . '/style.css', | |
array('foundation_css'), | |
false, | |
'all' | |
); | |
wp_enqueue_style( | |
'jquery_flipster_css', | |
get_stylesheet_directory_uri() . '/vendor_css/jquery.flipster.css', | |
array('foundation_css'), | |
false, | |
'all' | |
); | |
wp_enqueue_style( | |
'flipster_overrides_css', | |
get_stylesheet_directory_uri() . '/vendor_css/flipster_overrides.css', | |
array('foundation_css'), | |
false, | |
'all' | |
); | |
} | |
// don't think you need this line anymore, but uncomment if you do | |
//add_action( 'wp_enqueue_scripts', 'load_cornerstone_css' ); | |
// Enqueue Scripts | |
function load_cornerstone_scripts() { | |
wp_enqueue_script( | |
'jquery_flipster_js', | |
get_stylesheet_directory_uri() . '/js/jquery.flipster.js', | |
array(), | |
'0.3.2', | |
true | |
); | |
} | |
// don't think you need this line anymore, but uncomment if you do | |
//add_action( 'wp_enqueue_scripts', 'load_cornerstone_scripts' ); | |
// Disable the admin bar on mobiles but enable on desktops | |
function cornerstone_show_admin_bar() { | |
if( wp_is_mobile() || !is_user_logged_in() ) { | |
return false; | |
} else { | |
return true; | |
} | |
} | |
add_action( 'show_admin_bar' , 'cornerstone_show_admin_bar'); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Now I'm getting zero styles delivered to theme, rather than 2 copies of Foundation.