registered as $style ) { $handle = $style->handle; $src = $style->src; $gfonts = strpos( $src, 'fonts.googleapis' ); if ( false !== $gfonts ) { if ( ! array_key_exists( $handle, array_flip( $allowed ) ) ) { wp_dequeue_style( $handle ); } } } // Dequeue Google Fonts loaded by Revolution Slider. remove_action( 'wp_footer', array( 'RevSliderFront', 'load_google_fonts' ) ); } add_action( 'wp_enqueue_scripts', 'drgf_dequeueu_fonts', 9999 ); add_action( 'wp_print_styles', 'drgf_dequeueu_fonts', 9999 ); /** * Dequeue Google Fonts loaded by Elementor. */ add_filter( 'elementor/frontend/print_google_fonts', '__return_false' );