Hello,
After instlling your Plugin I checked the source code and I found this:
<link rel="preconnect" crossorigin /><style id="et-builder-googlefonts-cached-inline">/* Original: https://fonts.googleapis.com/css?family=Oswald:200,300,regular,500,600,700|Nunito:200,300,regular,500,600,700,800..
Now I’m not an expert but this seems strange to me. The code says that the font is cached inline and the origin is fonts.googleapis. It’s good that the font is cached inline since that is basically what I want right? However where does that come from and how do I erase it? I don’t want the source code to show fonts.googleapis at all. How can I achieve that?
]]>Dear Developer. The Plugin is great. At the same time it doesn’t work together with the Website and Landingpage Builder Thrive Architect. As the Self Hosted Google Fonts Plugin is activated it is not possible to safe Thrive-Sites.
Maybe it is possible to fix in the next Update?
Thanks
Best
Torben
Check this Screen Recording: https://share.getcloudapp.com/JruykYXk
]]>hello,
I have the problem that I can not activate the plugin after successful installation – use the plugin on several sites, it works everywhere only on a specific website does not – maybe it is not compatible with other plugins? can someone help me?
]]>When using PHP 8.0, the following deprecation warning is logged:
Deprecated Required parameter $field_id follows optional parameter $type
1 –
wp-content/plugins/selfhost-google-fonts/vendor/cmb2/includes/rest-api/CMB2_REST.php:693
cmb2_autoload_classes()
wp-includes/class-wp-hook.php:307
do_action(‘cmb2_init_hookup_sgf_options’)
wp-content/plugins/selfhost-google-fonts/vendor/cmb2/bootstrap.php:75
cmb2_bootstrap()
wp-content/plugins/selfhost-google-fonts/vendor/cmb2/init.php:161
CMB2_Bootstrap_242->include_cmb()
wp-includes/class-wp-hook.php:307
do_action(‘init’)
wp-settings.php:598
Plugin: selfhost-google-fonts
Hello,
i hope someone can help me with my problem.
I installed & enabled the plugin, but not all fonts are getting showed properly after i enabled it.
It also says the following above the header:
Warning: Undefined array key “Baskervville” in … plugins/selfhost-google-fonts/inc/process.php on line 269.
Does someone know what’s the problem?
Thanks.
]]>Hello, I created a webpage for our Sportclub. I installed the Site on a Subdomain. Now I want to duplicate the Site on a other Subdomain to test a few things. I replaced all database entries with the new subdomain, cleared all caches, but the plugin will load the google fonts from my “old” subdomain. Where can I change this?
Edit:
I just saw that the plugin has a own cache ?? Sorry now it works!!!
Hello, here is a tweak regarding the thread requests to have font-display setting.
Actually there is existing function for it in plugin, and it seems that author after updates leave it out.
File:
selfhost-google-fonts/inc/google-font.php
// Have a font-display setting?
//if (Plugin::options()->font_display) {
// $rules[] = 'font-display: ' . sanitize_text_field(Plugin::options()->font_display);
//}
$rules[] = 'font-display: block';
Thank you, regards
]]>Hi,
I installed this plugin and think I’m happy with it.
I only have two questions:
– Your last update is two years ago; is there any new update to come?
– Since having installed your plugin I have loads of actions in my daily log file (temp-write-test …). Is this normal/necessary and what exactly happens here?
Many thanks in advance for your answer(s) and best regards
Markus
Hello there,
In order to improve speed??and metric scores (GT-Metric, Kingdom, etc.), I tried to host the fonts locally with Self-hosted Google Fonts plugin. As far as speed is concerned, this worked like a charm setting up GT-Metric scores to 100% speed /98% slow with a loading time under 500 ms at Pingdom. However, the display of specific Hungarian characters - such as ?, ?, ú and so on - deteriorated significantly causing a mediocre UX.
Is there a way to host Google Fonts locally with this application without losing quality on Hungarian characters?
Thanks in advance for your help.
Best regards,
Zoltan
Hey,
I found a problem with your plugin: Self-Hosted Google Fonts and thrive leads (the builder does not safe…).
Is it possible to fix that problem? (It is not a the thrive leads problem, I asked the support there and they told me to ask you :))
]]>Hi. How can I clear font cache via php in function.php? Thx and regards…
]]>Hi, is there any documentation for using hooks? I would like to clear the cache via php. Thank You.
]]>In WP 5.4 / PHP 7.3.16, the following notice is logged.
You can check using the Query Monitor plugin, or enable debug logs.
Notice: Array to string conversion
wp-content/plugins/selfhost-google-fonts/inc/process.php:416
array_diff()
wp-content/plugins/selfhost-google-fonts/inc/process.php:416
Sphere\SGF\Process->remove_fonts_prefetch()
wp-includes/class-wp-hook.php:289
apply_filters('wp_resource_hints')
wp-includes/general-template.php:3212
wp_resource_hints()
wp-includes/class-wp-hook.php:287
do_action('wp_head')
wp-includes/general-template.php:2884
wp_head()
wp-content/themes/givingpress-lite/header.php:27
load_template('wp-content/themes/givingpress-lite/header.php')
wp-includes/template.php:672
locate_template()
wp-includes/general-template.php:41
get_header()
wp-content/themes/givingpress-lite/page.php:9
]]>
Any chance this plugin will be updated to include the ability to add font-display: swap;??
I’ve used (and loved) this plugin for a long time, but this update is definitely needed to stay current.
]]>I hereby want to present a solution for an unsolved problem, already described in several threads:
In short: When changing the values on the frontend and saving, they are successfully updated in the database. However, as soon as the page reloads, these changes are not reflected in the checkboxes.
also seen in not saving options
The reason for this issue is pretty simple.
Just edit wp-content/plugins/selfhost-google-fonts/inc/admin.php
and look for the section starting with
$options->add_field(array(
'name' => esc_html__('Disable for Admins', 'sphere-sgf'),
'desc' => esc_html__('Disable processing for logged in admin users or any user with capability "manage_options". (Useful if using a pagebuilder that conflicts)',$
'id' => 'disable_for_admins',
'type' => 'checkbox',
'default' => 0,
'attributes' => array('data-conditional-id' => 'enabled'),
));
have a look for the sections similar to the above one: “process_enqueues”, “process_css_files”, “process_css_inline” and “protocol_relative”. Now just correct their default values to
'default' => 0,
instead of 'default' => 1,
.
After you changed the default value to 0 for all of these sections and save the file, the checkboxes will reflect the real status.
The reason behind this:
If the option is enabled it is written to the configuration string in the database. If the option is not enabled it is not existant in the database’s configuration string and therefore the default value is used for status reflection. This means that the default should be 0 instead of 1 so that it correctly reflects the current status. If nothing is in the database the checkbox will reflect that the option is deactivated. If you activate it the default value 0 will be overwritten by the database value and will also correctly reflect that the option is enabled, now.
Pretty easy to fix.
@asadkn: It would be great if this could be integrated in a new, upcoming version. I would also open a pull request on github but sadly the code base on github is an old one (for example it’s missing the protocol_relative option) so it’s not a good idea to continue on that basis.
]]>Is this still being looked at? Can you please add a font display option?
]]>Hello,
your plugin has a problem with polish characters for fira sans, roboto fonts. If we disable the plugin, all fonts will be displayed correctly.
These characters display incorrectly with your plugin: ???ó???ń?
Please fix this. Thx in advance.
]]>Please update your wonderful plugin and make Tested up to: 5.3 ??
]]>Hey, I am really loving your plugin at the moment, but I have a little issue concerning the optimisation. Google PageSpeed Insights tell me the following: “Make sure the text remains visible while the web font is loading. Use the CSS font-display function for users to see the text while the web font is loading.” So I have been taking a look into it and I cannot figure out a way to get it working for me with this plugin enabled. Can you help me out with that?
Thank you!
Is this plugin not maintained at all? Saying this cause it was Tested up to: 4.9.11
also Last Updated: 1 year ago
.
The plugin works well, however, there is an issue with Extended Latin Characters, especially with Turkish Alphabet. Is this plugin related or web-page related?
Thanks.
I followed the instructions, cleared my cache, but GTmetrix is still indicating Google Font errors.
]]>Just wanted to know if this plugin works with Elementor.
I really need to know this before i use it ??
hi there,
i’m using astrid theme from athemes.com and WordPress 4.4.18
when activating the plugin thaa admin interface stops working and i have to remove the plugin via phpmyadmin.
Greetings Matt
]]>Hello,
I test it on a subsite of multisite, Here is some 404 issue:
and still show fonts from google:
Does it support multisite? or what did I miss in setting please?
Alex
]]>Good day!
We tried your pluugin in a way to make fewer http requests and hence increase the speed of the site, but it turned out the other way around. We have wp fastest cache free version implemented. Will it work with this plugin? If so, what is the configuration needed in your plugin to make it work and increase our site speed?
By the way, we tried to deselect some of the choices you have and it doesn’t save the changes. Is this on purpose?
In advance, thank you for your help and interest.
]]>Hi! Thanks for plugin! I think its great plugin, but i cant use it. I use litespeed plugin https://www.ads-software.com/plugins/litespeed-cache/ for optimizing and cache. When litespeed enable Self-Hosted Google Fonts
doesn’t work.
The plugin works great! – For a number of pages I maintain.
However, for my own site it does not work correctly.
My theme “SiteOrigin North” includes Google Fonts via “//fonts.googleapis.com” (without protocol to be able to handle http as well as https)
The original font link
<link rel='stylesheet' id='siteorigin-google-web-fonts-css' href='//fonts.googleapis.com/css?family=Droid+Sans%3A400%2C700&ver=18b175b350063bdc7c2aadd7b11644e1' type='text/css' media='all' />
is replaced by
<link rel='stylesheet' id='siteorigin-google-web-fonts-css' href='//www.[my-server].de/wp-content/uploads/sgf-css///www.[my-server].de/wp-content/uploads/sgf-css///fonts.googleapis.com/css?family=Droid+Sans%3A400%2C700&ver=18b175b350063bdc7c2aadd7b11644e1' type='text/css' media='all' />
That obviously does not work.
How can I work-around this?
Thanks,
Matt
Hello,
There are always some JS and CSS from CDNs in plugin and themes, but the CDNs are not always not stale, it would be great if there is an option to self host those CSS and JS, what do you think please?
Thanks
]]>The plugin works as aspected but all settings except the “disable for admins” are reenabled after changing and saving.
Furthermore I get a PHP Notice after activation.
Notice: Array to string conversion in /app/web/app/plugins/selfhost-google-fonts/inc/process.php on line 416
Using beaverbuilder theme + plugin.
]]>