Skip to content

Instantly share code, notes, and snippets.

@kristarella
Created February 5, 2014 04:14
Show Gist options
  • Save kristarella/32d37594520ee26fe1ae to your computer and use it in GitHub Desktop.
Save kristarella/32d37594520ee26fe1ae to your computer and use it in GitHub Desktop.
<?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');
@azzcatdesign
Copy link

Now I'm getting zero styles delivered to theme, rather than 2 copies of Foundation.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment