Last active
August 29, 2015 14:06
-
-
Save sareiodata/0d70d54e6167cddd7c44 to your computer and use it in GitHub Desktop.
hide default edit profile fields in the backend
This file contains 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
/* | |
* Hide Default Edit Profile Fields in the backend | |
*/ | |
function wppb_hide_personal_options(){ | |
?> | |
<script type="text/javascript"> | |
jQuery(document).ready(function($) { | |
$('form#your-profile > h3:first').hide(); | |
$('form#your-profile > table:first').hide(); | |
$('form#your-profile').show(); | |
$("h3:contains('About Yourself')").hide(); | |
$("label:contains('Biographical Info')").parents().eq(3).hide(); | |
$("label:contains('Nickname (required)')").parents().eq(1).before("<h3>Custom Header</h3>"); | |
}); | |
</script> | |
<?php | |
} | |
add_action('admin_head','wppb_hide_personal_options'); | |
function wppb_edit_contactmethods( $contactmethods ) { | |
unset($contactmethods['yim']); | |
unset($contactmethods['aim']); | |
unset($contactmethods['jabber']); | |
return $contactmethods; | |
} | |
add_filter('user_contactmethods','wppb_edit_contactmethods',10,1); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment