Skip to content

Instantly share code, notes, and snippets.

@hzlzh
Last active December 14, 2015 09:09
Show Gist options
  • Save hzlzh/5062635 to your computer and use it in GitHub Desktop.
Save hzlzh/5062635 to your computer and use it in GitHub Desktop.
WordPress 自定义添加/删除用户字段
<?php
/* add to functions.php of the theme */
add_filter('user_contactmethods','my_user_contactmethods');
function my_user_contactmethods($user_contactmethods ){
unset($user_contactmethods['aim']);
unset($user_contactmethods['yim']);
unset($user_contactmethods['jabber']);
$user_contactmethods ['weibo'] = '微博URL';
return $user_contactmethods ;
}
?>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment