Skip to content

Instantly share code, notes, and snippets.

@cre8tivediva
Last active September 26, 2017 18:34
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
Save cre8tivediva/6be63b85e494b7bf12c7df640e93cb10 to your computer and use it in GitHub Desktop.
Add New Buttons to the WordPress Editor
//* Enable hidden buttons to third row of post editor
function my_custom_mce_buttons_3( $buttons ) {
/**
* Enable core button(s) that are disabled by default
*/
$buttons[] = 'fontselect';
$buttons[] = 'fontsizeselect';
$buttons[] = 'wp_page';
$buttons[] = 'superscript';
$buttons[] = 'subscript';
$buttons[] = 'underline';
return $buttons;
}
add_filter( 'mce_buttons_3', 'my_custom_mce_buttons_3' );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment