Skip to content

Instantly share code, notes, and snippets.

@markusvonplunkett
Created June 19, 2017 09:36
Show Gist options
  • Save markusvonplunkett/2054817ee371c67afe5d2064d33f4519 to your computer and use it in GitHub Desktop.
Save markusvonplunkett/2054817ee371c67afe5d2064d33f4519 to your computer and use it in GitHub Desktop.
my_format_TinyMCE
// Remove H1 and H2 options from TinyMCE
function my_format_TinyMCE( $init ) {
$init['block_formats'] = "Paragraph=p; Heading 3=h3; Heading 4=h4; Preformatted=pre";
return $init;
}
add_filter( 'tiny_mce_before_init', __NAMESPACE__ . '\\my_format_TinyMCE');}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment