Created
December 7, 2013 09:15
-
-
Save ahmad24/7838906 to your computer and use it in GitHub Desktop.
wordpress : additional contact for user
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
<?php | |
/* | |
Plugin Name: User Contact Methods | |
Plugin URI: http://example.com | |
Description: Additional user contact methods. | |
Author: WROX | |
Author URI: http://goo.com | |
*/ | |
/* Add a filter to the hook. */ | |
add_filter( 'user_contactmethods', 'boj_user_contactmethods' ); | |
/* Function for adding new contact methods. */ | |
function boj_user_contactmethods( $user_contactmethods ) { | |
/* Add the Twitter contact method. */ | |
$user_contactmethods['twitter'] = 'Twitter Username'; | |
/* Add the phone number contact method. */ | |
$user_contactmethods['phone'] = 'Phone Number'; | |
/* Return the array with the new values added. */ | |
return $user_contactmethods; | |
} | |
?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment