Skip to content

Instantly share code, notes, and snippets.

@vanaf1979
Last active March 11, 2020 15:14
Show Gist options
  • Save vanaf1979/970521c3f6c874023e785523533f3040 to your computer and use it in GitHub Desktop.
Save vanaf1979/970521c3f6c874023e785523533f3040 to your computer and use it in GitHub Desktop.
<?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