Skip to content

Instantly share code, notes, and snippets.

@cliffordp
Created May 20, 2020 04:03
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save cliffordp/640ff4586c9a7c9ffe6656ff65326a5e to your computer and use it in GitHub Desktop.
Save cliffordp/640ff4586c9a7c9ffe6656ff65326a5e to your computer and use it in GitHub Desktop.
GeneratePress: Remove all Google Fonts loading and options.
<?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