This should be what you’re looking for – put this code into your theme’s functions.php
file:
add_filter( 'tiny_mce_before_init', 'yourprefix_tiny_mce_before_init' );
function yourprefix_tiny_mce_before_init( $init_array ) {
// filter styles:
$init_array['theme_advanced_styles'] = "your_style=your_class";
// filter formats:
$init_array['theme_advanced_blockformats'] = "p,h3,h4,h5";
return $init_array;
}
This way the only style that will be displayed is your_style
.
The 3rd line is taking care of tinymce formats – might be useful too.
See Plugin_API/Filter_Reference/tiny_mce_before_init for more informations and examples.
Related Posts:
- Extra TinyMCE editor strips and tags?
- in network setup super admin has the tinyMCE buttons and the regular admin has not
- Can Rich Text features be configured per user?
- Change the Theme in Jupyter Notebook?
- Forcing reload of editor-style.css
- Disable Visual editor for all users
- Initialize TinyMCE editor / visual editor after AJAX insert
- No filter of code on switch from html to visual editor, how?
- WordPress 3.9 – Trouble Editing TinyMCE 4.0
- How set defaults on wpLink()
- Why is the visual editor in WordPress limiting the width by wrapping the content?
- Editor removes tags
- How to modify image editor dialog options on WordPress?
- Adding a rich text editor to Excerpt
- How to include own css on wordpress tinymce editor?
- How to force TinyMCE in WordPress to replace newlines with tags and not with
- Avoid converting “>” to >
- How to add multiple buttons to TinyMCE?
- Why did multiple line breaks stop working in text editor?
- Disable WYSIWYG editor only when creating a page
- How to edit posts with the new wp_editor api?
- How can i add some static text above the editor?
- Add quicktag buttons to the HTML editor
- Force TinyMCE editor’s “Toolbar Toggle” to be automatically chosen & expanded
- WordPress 4.6 link edit dialog is too rudimentary
- Disable the Code View in the content editor?
- When switching from html to visual editor the tag gets corrupted
- Markup of oEmbed codes in the editor?
- How to add a class to ul tags created by the WordPress editor Tinymce?
- Re Order Editor to be after meta box [duplicate]
- How can I stop TinyMCE from converting my HTML entities to characters?
- post editor changes & to &
- Disable escaping html
- Gutenberg block editor – list of form components for custom blocks
- Completely disable editor
- Disable text tab on WordPress text-editor
- If two users attempt to modify a page, does WordPress still work correctly?
- How can I insert HTML attributes with an existing TinyMCE button?
- Add Shortcode inline inside Gutenberg block
- Change padding to text indent in “Increase indent” TinyMCE
- What’s the Best Way to Edit WordPress Files?
- Why is WordPress WYSIWYMG and how do I make it WYSIWYG?
- Want to have the Post editor remembering the last editing position
- Add visual editor capability to custom excerpt window?
- TinyMCE Autoresize
- TinyMCE editor – new lines not rendered on front end
- two tinyMCE editors in the same page
- Square brackets make WordPress ignore newline/paragraph
- WordPress tinymce prints empty P tag and break html format
- Open posts in editor in the ‘Text’ mode by default
- Text cut off on save
- line break are not working when editing a post [closed]
- Making the Post/Page Content Editor Box Bigger?
- Showing only certain buttons on tinymice content editor
- Set default text for the editor in new posts
- How to apply editor filter to posts with a specific custom post type
- How to *disable* the post content editor
- WP 3.3 my rich text category editor toolbar is gone!
- Add option for editors through `register_setting`
- Add table controls with wp_editor minimal editor configuration (‘teeny’)
- Open link in a new tab checked by default when adding a new link in visual post editor
- Insert shortcode in post editor from javascript (Visual / HTML)
- 2nd button row from WP Super Edit or TinyMCE Advanced doesn’t show to 2nd admin
- Remove all table widths from editor content
- WordPress post editor crashes with Polyfill typo
- TinyMCE Plugin Parameter
- WYSIWYG editor in WP 3.2 plugin
- How do I fix my ‘Path’ field when editing pages via the Dashboard?
- Define multiple Gutenberg editor widths
- How can I get the post content displayed in a text field that allows to edit posts?
- Add WYSIWYG to Image Description field
- edit posts through front-end
- Disable HTML (Text) Tab in Post Editor
- How to get Text Selection in WordPress Editor
- Float images in content
- How can I enable a TINYMCE rich text editor in the admin interface?
- Good tutorial on how to make custom write panels in WordPress 3?
- Always paste as a text in visual editor
- Add table button in editor without Plugin
- Our shortcode dropdown box in Tinymce is not working in WordPress 3.9?
- Use MarkItUp as editor and not the default
- Restrict other Admins from using Editor in Admin Panel
- Editor doesn’t load properly on my self-hosted WordPress 3.3
- the_editor() function
- How to add notice text above Post Editor?
- Tiny MCE-modifications (plugins) stopped working in WordPress 5.6
- Cannot access WordPress Appearance → Editor
- Edit the archive-{custom_page}.php via WP editor
- How to disable YouTube (and any other oembed) embeding in the editor
- Creating table layout in WYSIWYG editor
- Add default text to multiple wysiwyg editors
- Custom TinyMCE style formats disabled
- Bulk edit contents of pages
- How to leave a line between paragraphs when writing text in the visual or text editor
- Customize Editor Styles
- Multiple TinyMCE Editors in one Admin Page
- WYSIWYG eating up first p in td
- Visual editor issue by having multiple tiny mce editors in a CPT
- problem adding code into wp editor for https://wordpress.org/support [closed]
- Adding content in Gutenberg editor