Created
January 27, 2015 20:09
-
-
Save jester1979/9c0d4230462f1326780b to your computer and use it in GitHub Desktop.
Change contact methods
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
| add_filter( 'user_contactmethods', 'change_contactmethods' ); | |
| /** | |
| * Customize contact methods. | |
| * | |
| * @since 1.0.0 | |
| * | |
| * @param array $contactmethods Existing contact fields. | |
| * @return array Updated contact fields. | |
| */ | |
| function change_contactmethods( $contactmethods ) { | |
| // Add Twitter | |
| if ( ! isset( $contactmethods['twitter'] ) ) { | |
| $contactmethods['twitter'] = 'Twitter'; | |
| } | |
| // Add Facebook | |
| if ( ! isset( $contactmethods['facebook'] ) ) { | |
| $contactmethods['facebook'] = 'Facebook'; | |
| } | |
| // Add Google+ | |
| if ( ! isset( $contactmethods['googleplus'] ) ) { | |
| $contactmethods['googleplus'] = 'Google+'; | |
| } | |
| return $contactmethods; | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment