Last active
March 11, 2020 15:14
-
-
Save vanaf1979/970521c3f6c874023e785523533f3040 to your computer and use it in GitHub Desktop.
Snippet #009 Custom Gutenberg font sizes https://since1979.dev/wp-snippet-002-changing-the-gutenberg-font-sizes/
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 | |
/** | |
* disable_custom_font_sizes. | |
* | |
* Disable the custom font-size options in the Gutenberg editor | |
* | |
* @see https://since1979.dev/wp-snippet-002-changing-the-gutenberg-font-sizes/ | |
* | |
* @uses add_theme_support() https://developer.wordpress.org/reference/functions/add_theme_support/ | |
*/ | |
function disable_custom_font_sizes() | |
{ | |
add_theme_support('disable-custom-font-sizes'); | |
} | |
/** | |
* Hook: after_setup_theme. | |
* | |
* @uses after_setup_theme https://developer.wordpress.org/reference/hooks/after_setup_theme/ | |
* @uses add_action() https://developer.wordpress.org/reference/functions/add_action/ | |
*/ | |
add_action('after_setup_theme', 'disable_custom_font_sizes'); | |
?> | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment