Last active
August 29, 2015 13:57
-
-
Save billerickson/9585875 to your computer and use it in GitHub Desktop.
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 | |
/** | |
* Update Contact Methods | |
* | |
* @author Bill Erickson | |
* @link http://www.billerickson.net/code/add-remove-contact-methods/ | |
*/ | |
function be_contact_methods( $contactmethods ) { | |
$remove = array( 'aim', 'yim', 'jabber' ); | |
foreach( $remove as $service ) { | |
if( isset( $contactmethods[$service] ) ) { | |
unset( $contactmethods[$service]); | |
} | |
} | |
$add = array( | |
array( | |
'service' => 'linkedin', | |
'label' => 'LinkedIn URL', | |
), | |
array( | |
'service' => 'netvibes', | |
'label' => 'Netvibes URL', | |
), | |
array( | |
'service' => 'twitter', | |
'label' => 'Twitter URL' | |
), | |
); | |
foreach( $add as $item ) { | |
if( !isset( $contactmethods[$item['service']] ) ) { | |
$contactmethods[$item['service']] = $item['label']; | |
} | |
} | |
return $contactmethods; | |
} | |
add_filter( 'user_contactmethods', 'be_contact_methods' ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment