Skip to content

Instantly share code, notes, and snippets.

@bdwakefield
Forked from WillSquire/expose_mce_buttons_2.php
Created October 29, 2017 23:38
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save bdwakefield/222d08610a0d8d709cdd8adbad913535 to your computer and use it in GitHub Desktop.
Save bdwakefield/222d08610a0d8d709cdd8adbad913535 to your computer and use it in GitHub Desktop.
Expose Wordpress's subscript and superscript buttons for the default WYSIWYG editor (disabled by Wordpress by default)
/**
* Adds subscript and superscript buttons for Wordpress's WYSIWYG
* editor (disabled by Wordpress by default)
*
* @param $buttons
* @return array
*/
function expose_mce_buttons_2($buttons) {
$buttons[] = 'superscript';
$buttons[] = 'subscript';
return $buttons;
}
add_filter('mce_buttons_2', __NAMESPACE__ . '\\expose_mce_buttons_2');
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment