Simplify TinyMCE Text Style Options

It’s generally accepted in the SEO world that you should only have one h1 tag on each page. While opinions may differ on that (especially if you build correctly and use tags like aside and main), the ability to remove some options from the dropdown of styles is very welcome.

Drop this into your functions.php file, clean up the TinyMCE buttons, and you can spend less time worying that the client has chosen a fabulous-looking script font set in pink, in faux bold, twice the size.

/*****
  Remove some block styles
*****/
function origin_tinymce_block_formats($arr){
  $arr['block_formats'] = 'Paragraph=p;Heading 2=h2;Heading 3=h3;Heading 4=h4;Heading 5=h5;Heading 6=h6;Pre=pre;Code=code';
  return $arr;
}