I have a custom post type which supports editor. (WordPress version 3.5)
I want to customize the editor for it.
- Make it readonly
- Hide “Add Media” button
- Hide HTML editor
- Remove status bar showing word count
I am using the following code:
add_filter( 'tiny_mce_before_init', function( $args ) {
$args['readonly'] = 1;
$args['media_buttons'] = 0;
$args['theme_advanced_disable'] = "code";
return $args;
});
Only readonly is working. Is it not possible to do other customization using tiny_mce_before_init
?
It should be
'media_buttons' => FALSE
.⦠creates this editor:
If you want to hide/disable/prevent/remove the “Add Media”-button in 2018 you can do the following (in essence):
In WordPress ver 4.9 it does not seem media buttons can be turned off using the ‘tiny_mce_before_init’ hook.
Instead I was able to remove this using ‘wp_editor_settings’, like so: