Skip to content

Commit

Permalink
Put style actions in 'wp_print_styles'
Browse files Browse the repository at this point in the history
  • Loading branch information
chriskthomas authored Dec 11, 2023
1 parent d9ebc10 commit 6cbcd93
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions functions.php
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ function my_theme_enqueue_styles()
*/

// Minify CSS
add_action('wp_enqueue_scripts', 'ckt_minify_css', 20);
add_action('wp_print_styles', 'ckt_minify_css', 20);
function ckt_minify_css()
{
// Remove parent theme css
Expand All @@ -37,7 +37,7 @@ function ckt_minify_css()
}

// Remove fonts from parent theme
add_action('wp_enqueue_scripts', 'ckt_remove_parent_styles', 20);
add_action('wp_print_styles', 'ckt_remove_parent_styles', 20);
function ckt_remove_parent_styles()
{
// Google fonts
Expand All @@ -58,4 +58,4 @@ function remove_wp_block_library_css(){
wp_dequeue_style( 'wp-block-library' );
wp_dequeue_style( 'wp-block-library-theme' );
}
add_action( 'wp_enqueue_scripts', 'remove_wp_block_library_css', 100 );
add_action( 'wp_print_styles', 'remove_wp_block_library_css', 100 );

0 comments on commit 6cbcd93

Please sign in to comment.