Created
May 20, 2020 04:03
-
-
Save cliffordp/640ff4586c9a7c9ffe6656ff65326a5e to your computer and use it in GitHub Desktop.
GeneratePress: Remove all Google Fonts loading and options.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* GeneratePress: Remove all Google Fonts loading and options. | |
* | |
* @link https://gist.github.com/cliffordp/640ff4586c9a7c9ffe6656ff65326a5e This snippet. | |
* @link https://share.getcloudapp.com/NQuDXKJm 1min demo that this code works. | |
* @link https://toolset.com/documentation/adding-custom-code/using-toolset-to-add-custom-code/?aid=5336&affiliate_key=Lsvk04DjJOhq I'm using Toolset to add custom snippets. | |
*/ | |
toolset_snippet_security_check() or die( 'Direct access is not allowed' ); | |
// Put the code of your snippet below this comment. | |
add_filter( 'generate_typography_google_fonts', '__return_empty_string', 100 ); // Must be greater than 50. | |
add_filter( 'generate_google_fonts_array', '__return_empty_array' ); | |
add_filter( 'generate_typography_customize_list', '__return_empty_array' ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment