Last active
January 1, 2016 04:09
-
-
Save ntwb/c70caf5a0aa9d3062a6d to your computer and use it in GitHub Desktop.
bbPress - Custom User Contact Profile Fields http://codex.wordpress.org/Plugin_API/Filter_Reference/user_contactmethods
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: bbPress - Custom User Contact Profile Fields | |
Plugin URI: https://gist.github.com/ntwb/c70caf5a0aa9d3062a6d | |
Description: bbPress - Custom User Contact Profile Fields | |
Version: 0.1 | |
Author: Stephen Edgar - Netweb | |
Author URI: http://netweb.com.au | |
*/ | |
// http://generatewp.com/user-contact-methods/ | |
// http://codex.wordpress.org/Plugin_API/Filter_Reference/contactmethods | |
// Register User Contact Methods | |
function custom_user_contact_methods( $user_contact_method ) { | |
$user_contact_method['facebook'] = __( 'Facebook Username', 'text_domain' ); | |
$user_contact_method['twitter'] = __( 'Twitter Username', 'text_domain' ); | |
$user_contact_method['gplus'] = __( 'Google Plus', 'text_domain' ); | |
$user_contact_method['skype'] = __( 'Skype Username', 'text_domain' ); | |
/* Remove user contact methods */ | |
unset( $user_contact['aim'] ); | |
unset( $user_contact['jabber'] ); | |
return $user_contact_method; ; | |
} | |
// Hook into the 'user_contactmethods' filter | |
add_filter( 'user_contactmethods', 'custom_user_contact_methods' ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment