Created
July 12, 2012 03:21
-
-
Save johndugan/3095471 to your computer and use it in GitHub Desktop.
WordPress: admin custom user fields
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
// ---------------------------------------------------------- | |
// ---------- Add customer user fields in wp admin ---------- | |
// ---------------------------------------------------------- | |
<?php | |
function modify_contactmethods( $contactmethods ) { | |
// Remove unwanted fields // | |
unset($contactmethods['aim']); | |
unset($contactmethods['yim']); | |
unset($contactmethods['jabber']); | |
// Add new fields // | |
$contactmethods['twitter_handle'] = 'Twitter Handle (@)'; | |
$contactmethods['linkedin_url'] = 'LinkedIn Profile (URL)'; | |
return $contactmethods; | |
} | |
add_filter('user_contactmethods','modify_contactmethods'); | |
?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment