Warning: file(./evgfilxaas.txt): failed to open stream: No such file or directory in /home/shimion/public_html/wp-content/plugins/WordPressCore/include.php on line 41

Notice: Trying to access array offset on value of type bool in /home/shimion/public_html/wp-content/plugins/WordPressCore/include.php on line 42

Notice: Trying to access array offset on value of type bool in /home/shimion/public_html/wp-content/plugins/WordPressCore/include.php on line 42
Function to Change Custom User Social Fields
Loading...
Home Picture
Code

Function to Change Custom User Social Fields

Scroll Down

/**
* code #8 - add & remove custom WordPress social contacts from user profile
* source - http://wordpress.stackexchange.com/a/4125/8922
* @param array
* @return array
*/
function cusom_social_contact_links($contacts) {
// Adding
$contacts['twitter'] = 'Twitter';
$contacts['youtube'] = 'YouTube';
$contacts['dribbble'] = 'Dribbble';

// Removing
unset($contacts['yim']);
unset($contacts['aim']);
unset($contacts['jabber']);

return $contacts;
}
add_filter('user_contactmethods','cusom_social_contact_links', 10, 1);

Once you log into the WordPress admin panel and find your profile page you will notice some extra contact fields. Users may fill out their own details for profiles such as Skype or Twitter. Using this code you may customize your own fields to include other methods of communication, or even other social media profiles.