Skip to content

Instantly share code, notes, and snippets.

@bantunesm
Created June 28, 2022 06:42
Show Gist options
  • Save bantunesm/b48fda1dc6e3e0973b564961d8e66dcb to your computer and use it in GitHub Desktop.
Save bantunesm/b48fda1dc6e3e0973b564961d8e66dcb to your computer and use it in GitHub Desktop.
Add options to wysiwyg Wordpress
// Options wisywg
add_filter('mce_buttons_2', function( $buttons ) {
array_shift( $buttons );
array_unshift( $buttons, 'fontsizeselect');
return $buttons;
} );
add_filter( 'tiny_mce_before_init', function( $initArray ){
$initArray['theme_advanced_font_sizes'] = "9px 10px 12px 13px 14px 16px 18px 22px 24px 28px 32px 36px";
$initArray['fontsize_formats'] = "9px 10px 12px 13px 14px 16px 18px 22px 24px 28px 32px 36px";
return $initArray;
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment