Skip to content

Instantly share code, notes, and snippets.

@kreamweb
Created January 27, 2013 17:37
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save kreamweb/4649350 to your computer and use it in GitHub Desktop.
Save kreamweb/4649350 to your computer and use it in GitHub Desktop.
[wordpress] [filter] Add new Contact Fields to the User Profile
<?php
/*-----------------------------------------------------------------------------------*/
/* New Contacts Fiels
/*-----------------------------------------------------------------------------------*/
function new_contactmethods( $contactmethods ) {
$contactmethods['photo'] = 'Photo Link';
$contactmethods['position'] = 'Position';
$contactmethods['twitter'] = 'Twitter'; // Add Twitter
$contactmethods['facebook'] = 'Facebook'; // Add Facebook
$contactmethods['google'] = 'Google+';
$contactmethods['linkedin'] = 'LinkedIn';
unset($contactmethods['yim']); // Remove YIM
unset($contactmethods['aim']); // Remove AIM
unset($contactmethods['jabber']); // Remove Jabber
return $contactmethods;
}
add_filter('user_contactmethods','new_contactmethods',10,1);
?>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment