Changeset 3325513
- Timestamp:
- 07/10/2025 10:19:32 AM (8 months ago)
- Location:
- disable-remove-google-fonts
- Files:
-
- 8 edited
- 1 copied
-
tags/1.7.0 (copied) (copied from disable-remove-google-fonts/trunk)
-
tags/1.7.0/changelog.txt (modified) (1 diff)
-
tags/1.7.0/disable-remove-google-fonts.php (modified) (2 diffs)
-
tags/1.7.0/inc/remove-google-fonts.php (modified) (9 diffs)
-
tags/1.7.0/readme.txt (modified) (1 diff)
-
trunk/changelog.txt (modified) (1 diff)
-
trunk/disable-remove-google-fonts.php (modified) (2 diffs)
-
trunk/inc/remove-google-fonts.php (modified) (9 diffs)
-
trunk/readme.txt (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
disable-remove-google-fonts/tags/1.7.0/changelog.txt
r3226082 r3325513 1 = 1.7.0 = 2 3 * Tested with Blocksy and Neve themes 4 1 5 = 1.6.9 = 2 6 -
disable-remove-google-fonts/tags/1.7.0/disable-remove-google-fonts.php
r3226082 r3325513 6 6 * Author: Fonts Plugin 7 7 * Author URI: https://fontsplugin.com 8 * Version: 1. 6.98 * Version: 1.7.0 9 9 * License: GPLv2 or later 10 10 * License URI: https://www.gnu.org/licenses/old-licenses/gpl-2.0.txt … … 32 32 33 33 if ( ! defined( 'DRGF_VERSION' ) ) { 34 define( 'DRGF_VERSION', '1. 6.9' );34 define( 'DRGF_VERSION', '1.7.0' ); 35 35 } 36 36 -
disable-remove-google-fonts/tags/1.7.0/inc/remove-google-fonts.php
r3181515 r3325513 48 48 remove_action( 'wp_footer', array( 'RevSliderFront', 'load_google_fonts' ) ); 49 49 50 // Dequeue the Jupiter theme font loader. 51 wp_dequeue_script( 'mk-webfontloader' ); 52 wp_dequeue_script( 'jupiterx-webfont' ); 53 54 // Dequeue the Codestar Framework font loader. 55 wp_dequeue_script( 'csf-google-web-fonts' ); 56 57 wp_dequeue_script( 'mo-google-webfont' ); 50 // Dequeue common font loader scripts. 51 $scripts_to_dequeue = array( 52 'mk-webfontloader', 53 'jupiterx-webfont', 54 'csf-google-web-fonts', 55 'mo-google-webfont', 56 ); 57 foreach ( $scripts_to_dequeue as $script ) { 58 wp_dequeue_script( $script ); 59 } 58 60 59 61 global $wp_styles; … … 84 86 * remove the stylesheet too. 85 87 */ 86 foreach ( $wp_styles->registered as $style ) { 88 if ( ! empty( $style->deps ) ) { 89 $strings = array( 90 'google-fonts', 91 'google_fonts', 92 'googlefonts', 93 'bookyourtravel-heading-font', 94 'bookyourtravel-base-font', 95 'bookyourtravel-font-icon', 96 'twb-open-sans', 97 ); 87 98 foreach ( $style->deps as $dep ) { 88 $strings = [ 'google-fonts', 'google_fonts', 'googlefonts', 'bookyourtravel-heading-font', 'bookyourtravel-base-font', 'bookyourtravel-font-icon', 'twb-open-sans' ];89 99 if ( drgf_strposa( $dep, $strings ) === true ) { 90 100 $wp_styles->remove( $dep ); … … 112 122 add_filter( 113 123 'fl_builder_google_fonts_pre_enqueue', 114 function ( $fonts ) {124 function ( $fonts ) { 115 125 return array(); 116 126 } … … 122 132 add_filter( 123 133 'jupiterx_register_fonts', 124 function ( $fonts ) {134 function ( $fonts ) { 125 135 return array(); 126 136 }, … … 200 210 add_filter( 201 211 'fusion_google_fonts', 202 function ( $fonts ) {212 function ( $fonts ) { 203 213 return array(); 204 214 }, … … 260 270 /** 261 271 * Helper function to run strpos() using an array as the needle. 272 * 273 * @param string $haystack The string to search in. 274 * @param array $needles Array of strings to search for. 275 * @param int $offset Optional. Start position of search. Default 0. 276 * @return bool True if any needle is found, false otherwise. 262 277 */ 263 278 function drgf_strposa( $haystack, $needles, $offset = 0 ) { … … 265 280 foreach ( $needles as $needle ) { 266 281 $res = strpos( $haystack, $needle, $offset ); 267 if ( $res !== false ) return true; 282 if ( $res !== false ) { 283 return true; 284 } 268 285 } 269 286 … … 319 336 add_action( 320 337 'redux/loaded', 321 function ( $redux ) {338 function ( $redux ) { 322 339 $redux->args['async_typography'] = false; 323 340 } … … 334 351 */ 335 352 remove_action( 'wp_head', 'groovy_menu_add_gfonts_from_pre_storage' ); 336 337 353 } 338 354 -
disable-remove-google-fonts/tags/1.7.0/readme.txt
r3226082 r3325513 35 35 * Twenty Twenty-Four 36 36 * Twenty Twenty-Five 37 * GeneratePress38 37 * Acabado 39 38 * Avada 39 * Blocksy 40 * ColorMag 41 * Divi Extra 40 42 * Enfold 41 * Sydney43 * GeneratePress 42 44 * Hestia 43 45 * Hueman 44 * Vantage 45 * ColorMag 46 * JupiterX 46 47 * Kadence 48 * Neve 49 * OnePress 47 50 * Shapely 48 * OnePress49 * JupiterX50 51 * Stackable 51 52 * Storefront 52 * Divi Extra 53 * Sydney 54 * Vantage 53 55 * Zerif Lite 54 56 -
disable-remove-google-fonts/trunk/changelog.txt
r3226082 r3325513 1 = 1.7.0 = 2 3 * Tested with Blocksy and Neve themes 4 1 5 = 1.6.9 = 2 6 -
disable-remove-google-fonts/trunk/disable-remove-google-fonts.php
r3226082 r3325513 6 6 * Author: Fonts Plugin 7 7 * Author URI: https://fontsplugin.com 8 * Version: 1. 6.98 * Version: 1.7.0 9 9 * License: GPLv2 or later 10 10 * License URI: https://www.gnu.org/licenses/old-licenses/gpl-2.0.txt … … 32 32 33 33 if ( ! defined( 'DRGF_VERSION' ) ) { 34 define( 'DRGF_VERSION', '1. 6.9' );34 define( 'DRGF_VERSION', '1.7.0' ); 35 35 } 36 36 -
disable-remove-google-fonts/trunk/inc/remove-google-fonts.php
r3181515 r3325513 48 48 remove_action( 'wp_footer', array( 'RevSliderFront', 'load_google_fonts' ) ); 49 49 50 // Dequeue the Jupiter theme font loader. 51 wp_dequeue_script( 'mk-webfontloader' ); 52 wp_dequeue_script( 'jupiterx-webfont' ); 53 54 // Dequeue the Codestar Framework font loader. 55 wp_dequeue_script( 'csf-google-web-fonts' ); 56 57 wp_dequeue_script( 'mo-google-webfont' ); 50 // Dequeue common font loader scripts. 51 $scripts_to_dequeue = array( 52 'mk-webfontloader', 53 'jupiterx-webfont', 54 'csf-google-web-fonts', 55 'mo-google-webfont', 56 ); 57 foreach ( $scripts_to_dequeue as $script ) { 58 wp_dequeue_script( $script ); 59 } 58 60 59 61 global $wp_styles; … … 84 86 * remove the stylesheet too. 85 87 */ 86 foreach ( $wp_styles->registered as $style ) { 88 if ( ! empty( $style->deps ) ) { 89 $strings = array( 90 'google-fonts', 91 'google_fonts', 92 'googlefonts', 93 'bookyourtravel-heading-font', 94 'bookyourtravel-base-font', 95 'bookyourtravel-font-icon', 96 'twb-open-sans', 97 ); 87 98 foreach ( $style->deps as $dep ) { 88 $strings = [ 'google-fonts', 'google_fonts', 'googlefonts', 'bookyourtravel-heading-font', 'bookyourtravel-base-font', 'bookyourtravel-font-icon', 'twb-open-sans' ];89 99 if ( drgf_strposa( $dep, $strings ) === true ) { 90 100 $wp_styles->remove( $dep ); … … 112 122 add_filter( 113 123 'fl_builder_google_fonts_pre_enqueue', 114 function ( $fonts ) {124 function ( $fonts ) { 115 125 return array(); 116 126 } … … 122 132 add_filter( 123 133 'jupiterx_register_fonts', 124 function ( $fonts ) {134 function ( $fonts ) { 125 135 return array(); 126 136 }, … … 200 210 add_filter( 201 211 'fusion_google_fonts', 202 function ( $fonts ) {212 function ( $fonts ) { 203 213 return array(); 204 214 }, … … 260 270 /** 261 271 * Helper function to run strpos() using an array as the needle. 272 * 273 * @param string $haystack The string to search in. 274 * @param array $needles Array of strings to search for. 275 * @param int $offset Optional. Start position of search. Default 0. 276 * @return bool True if any needle is found, false otherwise. 262 277 */ 263 278 function drgf_strposa( $haystack, $needles, $offset = 0 ) { … … 265 280 foreach ( $needles as $needle ) { 266 281 $res = strpos( $haystack, $needle, $offset ); 267 if ( $res !== false ) return true; 282 if ( $res !== false ) { 283 return true; 284 } 268 285 } 269 286 … … 319 336 add_action( 320 337 'redux/loaded', 321 function ( $redux ) {338 function ( $redux ) { 322 339 $redux->args['async_typography'] = false; 323 340 } … … 334 351 */ 335 352 remove_action( 'wp_head', 'groovy_menu_add_gfonts_from_pre_storage' ); 336 337 353 } 338 354 -
disable-remove-google-fonts/trunk/readme.txt
r3226082 r3325513 35 35 * Twenty Twenty-Four 36 36 * Twenty Twenty-Five 37 * GeneratePress38 37 * Acabado 39 38 * Avada 39 * Blocksy 40 * ColorMag 41 * Divi Extra 40 42 * Enfold 41 * Sydney43 * GeneratePress 42 44 * Hestia 43 45 * Hueman 44 * Vantage 45 * ColorMag 46 * JupiterX 46 47 * Kadence 48 * Neve 49 * OnePress 47 50 * Shapely 48 * OnePress49 * JupiterX50 51 * Stackable 51 52 * Storefront 52 * Divi Extra 53 * Sydney 54 * Vantage 53 55 * Zerif Lite 54 56
Note: See TracChangeset
for help on using the changeset viewer.