Created
February 3, 2019 10:53
-
-
Save ofernandolopes/0b09a96bbcad437af86038b5572dbecd to your computer and use it in GitHub Desktop.
Remove Personal Options in WordPress Admin Profile Page
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
| //Remove Personal Options in WordPress Admin Profile Page | |
| //https://isabelcastillo.com/hide-personal-options-wordpress-admin-profile | |
| function remove_personal_options(){ | |
| echo '<script type="text/javascript">jQuery(document).ready(function($) { | |
| $(\'form#your-profile > h2:first\').remove(); // remove the "Personal Options" title | |
| $(\'form#your-profile tr.user-rich-editing-wrap\').remove(); // remove the "Visual Editor" field | |
| $(\'form#your-profile tr.user-admin-color-wrap\').remove(); // remove the "Admin Color Scheme" field | |
| $(\'form#your-profile tr.user-comment-shortcuts-wrap\').remove(); // remove the "Keyboard Shortcuts" field | |
| $(\'form#your-profile tr.user-admin-bar-front-wrap\').remove(); // remove the "Toolbar" field | |
| $(\'form#your-profile tr.user-language-wrap\').remove(); // remove the "Language" field | |
| $(\'form#your-profile tr.user-first-name-wrap\').remove(); // remove the "First Name" field | |
| $(\'form#your-profile tr.user-last-name-wrap\').remove(); // remove the "Last Name" field | |
| $(\'form#your-profile tr.user-nickname-wrap\').hide(); // Hide the "nickname" field | |
| $(\'table.form-table tr.user-display-name-wrap\').remove(); // remove the “Display name publicly as” field | |
| $(\'table.form-table tr.user-url-wrap\').remove();// remove the "Website" field in the "Contact Info" section | |
| $(\'h2:contains("About Yourself"), h2:contains("About the user")\').remove(); // remove the "About Yourself" and "About the user" titles | |
| $(\'form#your-profile tr.user-description-wrap\').remove(); // remove the "Biographical Info" field | |
| $(\'form#your-profile tr.user-profile-picture\').remove(); // remove the "Profile Picture" field | |
| });</script>'; | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment