Merge pull request #19 from BraadMartin/move-css

Move CSS enqueue to a later hook to come after plugins
This commit is contained in:
Mickey Kay
2015-06-01 11:38:25 -07:00
+16 -1
View File
@@ -31,6 +31,18 @@ function trestle_add_theme_support() {
}
add_action( 'after_setup_theme', 'trestle_remove_genesis_css_enqueue' );
/**
* Stop Genesis from enqueuing the child theme stylesheet in the usual way.
*
* @since 2.1.0
*/
function trestle_remove_genesis_css_enqueue() {
remove_action( 'genesis_meta', 'genesis_load_stylesheet' );
}
/*===========================================
* 3rd Party Libraries
===========================================*/
@@ -63,7 +75,7 @@ function trestle_load_bfa() {
* Header
===========================================*/
add_action( 'wp_enqueue_scripts', 'trestle_header_actions' );
add_action( 'wp_enqueue_scripts', 'trestle_header_actions', 15 );
/**
* Loads theme scripts and styles.
*
@@ -71,6 +83,9 @@ add_action( 'wp_enqueue_scripts', 'trestle_header_actions' );
*/
function trestle_header_actions() {
// Our main stylesheet.
wp_enqueue_style( 'trestle', get_stylesheet_uri(), array(), TRESTLE_THEME_VERSION );
// Google fonts.
wp_enqueue_style( 'theme-google-fonts', '//fonts.googleapis.com/css?family=Lato:300,400,700' );