Plugin Directory

Changeset 3325513


Ignore:
Timestamp:
07/10/2025 10:19:32 AM (8 months ago)
Author:
DannyCooper
Message:

Update to version 1.7.0 from GitHub

Location:
disable-remove-google-fonts
Files:
8 edited
1 copied

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
    15= 1.6.9 =
    26
  • disable-remove-google-fonts/tags/1.7.0/disable-remove-google-fonts.php

    r3226082 r3325513  
    66 * Author: Fonts Plugin
    77 * Author URI: https://fontsplugin.com
    8  * Version: 1.6.9
     8 * Version: 1.7.0
    99 * License: GPLv2 or later
    1010 * License URI: https://www.gnu.org/licenses/old-licenses/gpl-2.0.txt
     
    3232
    3333if ( ! defined( 'DRGF_VERSION' ) ) {
    34     define( 'DRGF_VERSION', '1.6.9' );
     34    define( 'DRGF_VERSION', '1.7.0' );
    3535}
    3636
  • disable-remove-google-fonts/tags/1.7.0/inc/remove-google-fonts.php

    r3181515 r3325513  
    4848    remove_action( 'wp_footer', array( 'RevSliderFront', 'load_google_fonts' ) );
    4949
    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    }
    5860
    5961    global $wp_styles;
     
    8486     * remove the stylesheet too.
    8587     */
    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        );
    8798        foreach ( $style->deps as $dep ) {
    88             $strings = [ 'google-fonts', 'google_fonts', 'googlefonts', 'bookyourtravel-heading-font', 'bookyourtravel-base-font', 'bookyourtravel-font-icon', 'twb-open-sans' ];
    8999            if ( drgf_strposa( $dep, $strings ) === true ) {
    90100                $wp_styles->remove( $dep );
     
    112122add_filter(
    113123    'fl_builder_google_fonts_pre_enqueue',
    114     function( $fonts ) {
     124    function ( $fonts ) {
    115125        return array();
    116126    }
     
    122132add_filter(
    123133    'jupiterx_register_fonts',
    124     function( $fonts ) {
     134    function ( $fonts ) {
    125135        return array();
    126136    },
     
    200210    add_filter(
    201211        'fusion_google_fonts',
    202         function( $fonts ) {
     212        function ( $fonts ) {
    203213            return array();
    204214        },
     
    260270/**
    261271 * 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.
    262277 */
    263278function drgf_strposa( $haystack, $needles, $offset = 0 ) {
     
    265280    foreach ( $needles as $needle ) {
    266281        $res = strpos( $haystack, $needle, $offset );
    267         if ( $res !== false ) return true;
     282        if ( $res !== false ) {
     283            return true;
     284        }
    268285    }
    269286
     
    319336add_action(
    320337    'redux/loaded',
    321     function( $redux ) {
     338    function ( $redux ) {
    322339        $redux->args['async_typography'] = false;
    323340    }
     
    334351     */
    335352    remove_action( 'wp_head', 'groovy_menu_add_gfonts_from_pre_storage' );
    336 
    337353}
    338354
  • disable-remove-google-fonts/tags/1.7.0/readme.txt

    r3226082 r3325513  
    3535* Twenty Twenty-Four
    3636* Twenty Twenty-Five
    37 * GeneratePress
    3837* Acabado
    3938* Avada
     39* Blocksy
     40* ColorMag
     41* Divi Extra
    4042* Enfold
    41 * Sydney
     43* GeneratePress
    4244* Hestia
    4345* Hueman
    44 * Vantage
    45 * ColorMag
     46* JupiterX
    4647* Kadence
     48* Neve
     49* OnePress
    4750* Shapely
    48 * OnePress
    49 * JupiterX
    5051* Stackable
    5152* Storefront
    52 * Divi Extra
     53* Sydney
     54* Vantage
    5355* Zerif Lite
    5456
  • disable-remove-google-fonts/trunk/changelog.txt

    r3226082 r3325513  
     1= 1.7.0 =
     2
     3* Tested with Blocksy and Neve themes
     4
    15= 1.6.9 =
    26
  • disable-remove-google-fonts/trunk/disable-remove-google-fonts.php

    r3226082 r3325513  
    66 * Author: Fonts Plugin
    77 * Author URI: https://fontsplugin.com
    8  * Version: 1.6.9
     8 * Version: 1.7.0
    99 * License: GPLv2 or later
    1010 * License URI: https://www.gnu.org/licenses/old-licenses/gpl-2.0.txt
     
    3232
    3333if ( ! defined( 'DRGF_VERSION' ) ) {
    34     define( 'DRGF_VERSION', '1.6.9' );
     34    define( 'DRGF_VERSION', '1.7.0' );
    3535}
    3636
  • disable-remove-google-fonts/trunk/inc/remove-google-fonts.php

    r3181515 r3325513  
    4848    remove_action( 'wp_footer', array( 'RevSliderFront', 'load_google_fonts' ) );
    4949
    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    }
    5860
    5961    global $wp_styles;
     
    8486     * remove the stylesheet too.
    8587     */
    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        );
    8798        foreach ( $style->deps as $dep ) {
    88             $strings = [ 'google-fonts', 'google_fonts', 'googlefonts', 'bookyourtravel-heading-font', 'bookyourtravel-base-font', 'bookyourtravel-font-icon', 'twb-open-sans' ];
    8999            if ( drgf_strposa( $dep, $strings ) === true ) {
    90100                $wp_styles->remove( $dep );
     
    112122add_filter(
    113123    'fl_builder_google_fonts_pre_enqueue',
    114     function( $fonts ) {
     124    function ( $fonts ) {
    115125        return array();
    116126    }
     
    122132add_filter(
    123133    'jupiterx_register_fonts',
    124     function( $fonts ) {
     134    function ( $fonts ) {
    125135        return array();
    126136    },
     
    200210    add_filter(
    201211        'fusion_google_fonts',
    202         function( $fonts ) {
     212        function ( $fonts ) {
    203213            return array();
    204214        },
     
    260270/**
    261271 * 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.
    262277 */
    263278function drgf_strposa( $haystack, $needles, $offset = 0 ) {
     
    265280    foreach ( $needles as $needle ) {
    266281        $res = strpos( $haystack, $needle, $offset );
    267         if ( $res !== false ) return true;
     282        if ( $res !== false ) {
     283            return true;
     284        }
    268285    }
    269286
     
    319336add_action(
    320337    'redux/loaded',
    321     function( $redux ) {
     338    function ( $redux ) {
    322339        $redux->args['async_typography'] = false;
    323340    }
     
    334351     */
    335352    remove_action( 'wp_head', 'groovy_menu_add_gfonts_from_pre_storage' );
    336 
    337353}
    338354
  • disable-remove-google-fonts/trunk/readme.txt

    r3226082 r3325513  
    3535* Twenty Twenty-Four
    3636* Twenty Twenty-Five
    37 * GeneratePress
    3837* Acabado
    3938* Avada
     39* Blocksy
     40* ColorMag
     41* Divi Extra
    4042* Enfold
    41 * Sydney
     43* GeneratePress
    4244* Hestia
    4345* Hueman
    44 * Vantage
    45 * ColorMag
     46* JupiterX
    4647* Kadence
     48* Neve
     49* OnePress
    4750* Shapely
    48 * OnePress
    49 * JupiterX
    5051* Stackable
    5152* Storefront
    52 * Divi Extra
     53* Sydney
     54* Vantage
    5355* Zerif Lite
    5456
Note: See TracChangeset for help on using the changeset viewer.