Created
October 7, 2021 01:41
-
-
Save strsar/bd5f78c82e217746be8d8abbcaf9e848 to your computer and use it in GitHub Desktop.
[WP] An unfortunate way to cleanup user profiles...
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php defined('ABSPATH') or header('Location: /'); | |
| /** | |
| * Yup... really the only way... display:none | |
| */ | |
| add_action('admin_head', 'remove_edit_profile_fields_css'); | |
| function remove_edit_profile_fields_css() { | |
| echo "<style> | |
| /** | |
| * Remove Visual Editor Option | |
| */ | |
| #profile-page .user-rich-editing-wrap { | |
| display: none; | |
| } | |
| /** | |
| * Remove Keyboard Shortcuts Option | |
| */ | |
| #profile-page .user-comment-shortcuts-wrap { | |
| display: none; | |
| } | |
| /** | |
| * Remove Toolbar Option | |
| */ | |
| /** #profile-page .user-admin-bar-front-wrap { | |
| display: none; | |
| } */ | |
| /** | |
| * Remove Syntax Highlighting | |
| */ | |
| #profile-page .user-syntax-highlighting-wrap { | |
| display: none; | |
| } | |
| </style>"; | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment