1-line change?
-
The Lighthouse accessibility audit flagged that the id “kt_global_css_variables” shows up twice per page on my site. Of course, id’s are supposed to be unique. I took a look at index.php and saw line 377:
add_action('wp_print_styles', array($this, 'print_global_css_variables'));
That can result in printing the style multiple times. If you just swap it over to use the newer/more-recommended
wp_enqueue_scripts
hook instead, you’re golden.add_action('wp_enqueue_scripts', array($this, 'print_global_css_variables'));
I’d submit a real patch, but I haven’t used SVN in a decade and don’t quite remember how.
Viewing 7 replies - 1 through 7 (of 7 total)
Viewing 7 replies - 1 through 7 (of 7 total)
- The topic ‘1-line change?’ is closed to new replies.