Skip to content

Instantly share code, notes, and snippets.

@ntwb
Last active January 1, 2016 04:09
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ntwb/c70caf5a0aa9d3062a6d to your computer and use it in GitHub Desktop.
Save ntwb/c70caf5a0aa9d3062a6d to your computer and use it in GitHub Desktop.
<?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