Switch: “Do NOT use Google Fonts” (to skip that part in the websites header)

  • Author
    Posts
  • #133552
    inhive_mk
    Power User

    Greetings, Cryout Team!

    After reading on this page, researching on the internet and a little trial & error action, I managed to download my desired Google Fonts for my Esotera-powered website in order to host them locally on my server (here in Germany, due to DSGVO regulations) and implement them into your great Esotera Plus theme. So far, so good.

    The local fonts are in use now – properly tested – and there is no more reason for the theme to connect to the Google Servers for any font stuff. BUT… The following lines (in the style.php) cause the theme to put <link> in the header anyways:

    // Merged google fonts
    if ( !empty($gfonts) ){
    wp_enqueue_style( ‘esotera-googlefonts’, ‘//fonts.googleapis.com/css?family=’ . implode( “|” ,
    array_unique( array_merge( $roots, $gfonts ) ) ), null, _CRYOUT_THEME_VERSION );
    };

    The header tag that is produced does not even work (changed my fonts name, to distinguish them clearly from the online version – so the link grabs into nowhere) but for any “dumbass” outthere trying to sue my company for any kind of DSGVO stuff, it still looks like it has any effect – and maybe by even getting contacted with an invalid request, the Google Server might get the visitors IP, so…

    Long story short: Could you guys PLEASE implement a switch that reads “DO NOT USE GOOGLE FONTS” and switches the function off completely, so that we HAVE to rely on system fonts OR locally hosted ones and the sourcecode of the homepages stays tidy…

    That would be awesome! Thanks in advance!

    (By the way: I edited the style.php in my theme to get what I need for now, but it would be a 1000 times nicer if that would be a fully integrated – and updateable – solution of this theme, or ALL themes, I guess)

    #133601
    David Eickhoff
    Power User

    I endorse this request! Would be really nice to have.

    #134817
    Zed
    Cryout Creations mastermind

    Hi,

    The support for local fonts is partially broken in the current themes release making them still attempt to enqueue the font files from Google.
    The
    if ( ! empty( $options[$itemg] ) && ! preg_match( '/custom\sfont/i', $options[$item] ) ) {
    check in includes/style.php should instead be
    if ( ! empty( $options[$itemg] ) && ! preg_match( '/local\sfont/i', $options[$item] ) ) {

    We’ll have this sorted out as soon as possible with another round of updates.


    If you like our creations, help us share by rating them on WordPress.org.
    Please check the available documentation and search the forums before starting a topic.
Viewing 3 posts - 1 through 3 (of 3 total)

You need to log in to reply to this topic.