1

I'am stuck in catching enqueued style. I try to optimize website for PageSpeed. Site use plugin WPBakery Visual Composer as WYSIWYG editor. Every block supports Google Fonts, which added with wp_enqueue_style, but without add_action, just call wp_enqueue_style. In my functions.php, when I try to dequeue this style, to load this font with JS, I don't see this style in list of enqueued styles. I call this code, but I don't see the id in the list

function inspect_styles() {
        global $wp_styles;
        print_r($wp_styles->queue);
        print_r($wp_styles->registered);
}
add_action( 'wp_print_scripts', 'inspect_styles' );

The id of style generated automaticaly - maybe this is the reason?

wp_enqueue_style( 'vc_google_fonts_' . vc_build_safe_css_class( $google_fonts_data['values']['font_family'] ), '//fonts.googleapis.com/css?family=' . $google_fonts_data['values']['font_family'] . $subsets );

1 Answer 1

0

Here is a good place to start, definitely you will find your answer - https://wpbakery.atlassian.net/wiki/pages/viewpage.action?pageId=524319

1
  • Please don't just add a link, add your own answer. Also, that link has nothing to do with the question.
    – Fayaz
    Commented Feb 24, 2017 at 9:17

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.