Created
January 20, 2017 08:33
-
-
Save xyulex/d8f444e27bf57344e1bf022961c0dc7f to your computer and use it in GitHub Desktop.
TinyMCE: Eliminar botónes de selector de H1,H2....
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 | |
// Do NOT include the opening php tag above | |
add_filter('tiny_mce_before_init', 'tiny_mce_remove_unused_formats' ); | |
/* | |
* Modify TinyMCE editor to remove H1. | |
*/ | |
function tiny_mce_remove_unused_formats($init) { | |
// Add block format elements you want to show in dropdown | |
$init['block_formats'] = 'Paragraph=p;Heading 2=h2;Heading 3=h3;Heading 4=h4;Heading 5=h5;Heading 6=h6;Address=address;Pre=pre'; | |
return $init; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment