For disabling the text tab for all users except administrators, you can add the following:
function my_editor_settings($settings) {
if ( ! current_user_can('administrator') ) {
$settings['quicktags'] = false;
return $settings;
} else {
$settings['quicktags'] = true;
return $settings;
}
}
add_filter('wp_editor_settings', 'my_editor_settings');
Related Posts:
- Drag-and-drop “Panels”-style visual layout editor?
- How can I get the post content displayed in a text field that allows to edit posts?
- Getting selected (highlighted) html from the Visual Editor on Edit Post page?
- Why is WPBakery Page Builder backend editor not clickable? [closed]
- Trouble adding tiny mce to textarea in custom plugin
- Show WordPress Plugin Menu(Admin) To Editor
- How do I add multiple buttons to Tiny MCE in a single plugin?
- Plugin permissions for Editor role
- Role based permission edit for plugins
- can’t use span or icon tags on when editing visual composer element
- Extending the “Add Media”-Dialog … how do I finally insert something to the Post?
- Better code/text editing for posts and pages?
- Filter html of WordPress editor in visual mode only
- How can I replace the built in WordPress editor?
- How to prevent a post from being deleted?
- Deactivate plugin for a specific user group
- How to add “Stick this post to the front page” to front end?
- Publish author posts only with editor approval?
- How can I modify the Capability needed to access a plugin’s options?
- Get a button for in the Editor
- Limit access to posts/pages by user roles
- How to enable edit button in the theme’s customize UI?
- How to disable Gutenberg editor?
- WordPress Capabilities: edit_user vs edit_users
- use WordPress theme / plugin editor in my plugin
- Allowing Custom Capability to Manage Plugin Options
- Disable plugins for a specific user role
- User profiles and object associations
- 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
- Issues creating a tinyMCE plugin that creates a custom link
- Specific post user permissions
- How can I let users to access plugin functions based on roles?
- Dynamic homepage according to user role
- Restricting users to a specific front end page [closed]
- How to Add TinyMCE’s plugin in wordpress?
- WordPress roles – Protect administrator role
- Allow Facebook to preview posts before published
- How to add custom JS to tinymce in wordpress
- how to load tinymce external plugin
- Keep user’s privileges on accessing contents in JSON response
- Advanced Custom Fields/User Role Editor – how to hide ACF for certain users?
- Is there a plugin to insert pre-defined link into editor?
- How create a role with admin capability less 1 or 2?
- Set user ID at time of wp_create_user
- Update User Role
- Getting user roles in plugin files
- How to achieve certain page (url) accessible to certain users
- Tiny MCE-modifications (plugins) stopped working in WordPress 5.6
- Uncode theme content block header ignoring saved changes/not updating?
- Advanced Custom Fields plugin – get text from editor field and save it in a variable
- Disable plugin per user role
- Custom TinyMCE style formats disabled
- how to give a user a role?
- Redirection of users away from wp-admin (but not administrators)
- Set featured image using javascript in post editor
- How to edit content before post update
- How to set add question capability for author role in wp pro quiz plugin
- Using TinyMCE in plugin?
- Getting Theme element into plugins page editor in wp admin
- How to add custom table style for table block in gutenberg editor
- Is there any way to make myself an admin?
- Disable Plugin with one button
- Understanding State in WordPress Multisites
- How to allow Contributors to publish articles after approval
- Add User Role: Pre-saved in User-Meta [SOLVED]
- How to add fields in the WordPress editor?
- Multiple authors and readers restricted by role [closed]
- Custom Login page with custom redirects for each user?
- How to add HTML5 required on wp_editor
- Mutliple users editing single document in wordspress
- Show media-uploads to all users
- How To Create A File Archive in WordPress?
- “After file loaded” action
- How to disable tinyMCE button added by a plugin?
- Edit part of a post
- WordPress Membership Plugin Advice [closed]
- How to hide plugin options for editors via functions.php
- Plugin privelages for “editors”
- Plugin access and Roles
- Plugin Hook When New Author Added
- Show an admin menu item in Editor role
- How to apply to hide TinyMCE (wp_editor) on button click
- How to hide the cell properties and row properties in TinyMCE WordPress?
- Allow a particular user to access a particular plugin?
- Allow a page to be edited by a specific custom role
- How to allow code like PHP, SQL, HTML to WPBakery Visual Composer?
- How to create different views for different user roles?
- Failed to load resource: the server responded with a status of 500 () post.php
- How can I disable access to plugin settings in wp admin for other roles
- Remove dashboard links from wordpress
- How to show private pages based on a user’s role?
- How to allow editors to only edit certain categories?
- Sanitize AROUND shortcode
- Why user profile update creates Additional Capabilities
- Using Iris Colorpicker on TinyMCE shortcodes page [duplicate]
- How to give different user access to different people?
- registration plugin [closed]
- edit slider plugin capability for custom_role