Version Description
Download this release
Release Info
Developer | DannyCooper |
Plugin | Disable and Remove Google Fonts |
Version | 1.3.5 |
Comparing to | |
See all releases |
Code changes from version 1.3.4 to 1.3.5
- disable-remove-google-fonts.php +14 -10
disable-remove-google-fonts.php
CHANGED
@@ -5,7 +5,7 @@
|
|
5 |
* Description: Optimize frontend performance by disabling Google Fonts. GDPR-friendly.
|
6 |
* Author: Fonts Plugin
|
7 |
* Author URI: https://fontsplugin.com
|
8 |
-
* Version: 1.3.
|
9 |
* License: GPLv2 or later
|
10 |
* License URI: https://www.gnu.org/licenses/old-licenses/gpl-2.0.txt
|
11 |
*
|
@@ -21,6 +21,19 @@ if ( ! defined( 'ABSPATH' ) ) {
|
|
21 |
* Dequeue Google Fonts based on URL.
|
22 |
*/
|
23 |
function drgf_dequeueu_fonts() {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
24 |
global $wp_styles;
|
25 |
|
26 |
if ( ! ( $wp_styles instanceof WP_Styles ) ) {
|
@@ -57,15 +70,6 @@ function drgf_dequeueu_fonts() {
|
|
57 |
}
|
58 |
}
|
59 |
|
60 |
-
// Remove fonts added by the Divi Extra theme
|
61 |
-
remove_action( 'wp_footer', 'et_builder_print_font' );
|
62 |
-
|
63 |
-
// Dequeue Google Fonts loaded by Revolution Slider.
|
64 |
-
remove_action( 'wp_footer', array( 'RevSliderFront', 'load_google_fonts' ) );
|
65 |
-
|
66 |
-
// Dequeue the Jupiter theme font loader.
|
67 |
-
wp_dequeue_script( 'mk-webfontloader' );
|
68 |
-
|
69 |
}
|
70 |
add_action( 'wp_enqueue_scripts', 'drgf_dequeueu_fonts', 9999 );
|
71 |
add_action( 'wp_print_styles', 'drgf_dequeueu_fonts', 9999 );
|
5 |
* Description: Optimize frontend performance by disabling Google Fonts. GDPR-friendly.
|
6 |
* Author: Fonts Plugin
|
7 |
* Author URI: https://fontsplugin.com
|
8 |
+
* Version: 1.3.5
|
9 |
* License: GPLv2 or later
|
10 |
* License URI: https://www.gnu.org/licenses/old-licenses/gpl-2.0.txt
|
11 |
*
|
21 |
* Dequeue Google Fonts based on URL.
|
22 |
*/
|
23 |
function drgf_dequeueu_fonts() {
|
24 |
+
|
25 |
+
// Remove fonts added by the Divi Extra theme
|
26 |
+
remove_action( 'wp_footer', 'et_builder_print_font' );
|
27 |
+
|
28 |
+
// Dequeue Google Fonts loaded by Revolution Slider.
|
29 |
+
remove_action( 'wp_footer', array( 'RevSliderFront', 'load_google_fonts' ) );
|
30 |
+
|
31 |
+
// Dequeue the Jupiter theme font loader.
|
32 |
+
wp_dequeue_script( 'mk-webfontloader' );
|
33 |
+
|
34 |
+
// Remove the Sydney theme resource hints.
|
35 |
+
remove_action( 'wp_head', 'sydney_preconnect_google_fonts' );
|
36 |
+
|
37 |
global $wp_styles;
|
38 |
|
39 |
if ( ! ( $wp_styles instanceof WP_Styles ) ) {
|
70 |
}
|
71 |
}
|
72 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
73 |
}
|
74 |
add_action( 'wp_enqueue_scripts', 'drgf_dequeueu_fonts', 9999 );
|
75 |
add_action( 'wp_print_styles', 'drgf_dequeueu_fonts', 9999 );
|