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?
- Hook into existing tinyMCE button
- Can a Plugin Override New User Default Role Type
- Can I allow certain people to add/edit pages within a parent?
- Add custom text color WordPress 3.9 TinyMCE 4 Visual editor
- can i limit editing specific custom fields to certain roles?
- Add user role to generated plugin
- How to add custom table style for table block in gutenberg editor
- Multisite – maximum number of users with specific role
- Is there any way to make myself an admin?
- Disable Plugin with one button
- Understanding State in WordPress Multisites
- Overriding post’s font-family
- Allow only Admin role to access plugin settings/options page
- How to allow Contributors to publish articles after approval
- Is there a maximum length to a WordPress Page?
- Custom shortcode for displaying user based on a role parameter
- How I can change the required capability for an admin menu without editing the plugin file?
- Add User Role: Pre-saved in User-Meta [SOLVED]
- How to add fields in the WordPress editor?
- Access post title from custom meta box on title change
- How to add table class for tables of TinyMCE advanced wordpress plugin? [closed]
- 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
- Is there a good way to load tiny_mce_popup.js through editor.windowManager.open?
- Generate Own Custom CSS Button with icon
- Remove specific administrator’s capability
- “switchEditors is not defined” with wp_editor() in jQuery UI tabs
- Example for use tinymce in wordpress 3.5.1?
- How To Create A File Archive in WordPress?
- Custom characters of tinymce editor are saved as question mark
- enable TinyMCE for comment forms
- Creating teams of users 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
- Is there a syntax highlighting plugin for HTML View? [duplicate]
- Plugin privelages for “editors”
- Keyboard shortcut for headings on safari
- Best Browser for Editing Posts
- Plugin access and Roles
- Plugin for visitors to edit content without logging in? [closed]
- Plugin Hook When New Author Added
- Problem enabling the user to edit Markdown and displaying the HTML output (WMD Editor plugin for WordPress)
- Adding plugin editing capability for Author
- How to permanently show Word Counter on Create/Edit Page. WordPress5.9.3
- Show an admin menu item in Editor role
- How to apply to hide TinyMCE (wp_editor) on button click
- TinyMCE strips off the href tag inside span, if i change from text to visual
- Adding a Media Button to the WordPress Content Editor
- implement custom roles in custom plugin
- How to hide the cell properties and row properties in TinyMCE WordPress?
- Is classical wordpress eidtor a good option for me to include a large table with a large number of images on my webpage?
- Allow a particular user to access a particular plugin?
- See which user role / capability is needed to use a plugin
- how i retreive the post content while editing it in real time however the editor is tinymce or gutenberg
- Need help with Task assigning and rewarding as currency which withdrawable
- how to create user profile pages and display them based on users roles
- Images are broken in Wysiwyg Editor – ACF backend
- Allow editor user to full permission to access plugin settings
- How to use wp_editor and save its data in wp_posts table
- 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 make this custom capability work? [duplicate]
- How to create different views for different user roles?
- Failed to load resource: the server responded with a status of 500 () post.php
- Public WP website with one area just for members
- How can I disable access to plugin settings in wp admin for other roles
- How to disable/enable PHP plugin functionality based on a TinyMCE toggle-button
- 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?
- Disable plugin for administrator
- How do I restrict a second admin certain access?
- User / membership Plugin [closed]
- Restrict role to use a plugin
- How to get short description under heading – Visual Composer [closed]
- Sanitize AROUND shortcode
- Why user profile update creates Additional Capabilities
- TinyMCE how to add css when inputing a text
- Overwrite user role
- Visual editor popover or placeholder