Skip to content

Instantly share code, notes, and snippets.

@jester1979
Created January 27, 2015 20:09
Show Gist options
  • Select an option

  • Save jester1979/9c0d4230462f1326780b to your computer and use it in GitHub Desktop.

Select an option

Save jester1979/9c0d4230462f1326780b to your computer and use it in GitHub Desktop.
Change contact methods
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