Skip to:

Re: Adding Custom Profile Fields



If you go to bb-includes/functions.php you’ll see a function called “get_profile_info_keys()”

This function holds the data you want, but you don’t want to adjust that file directly since it’s a core file, however, in the current release of my avatar plug-in, you do have to change that line.

But if you notice, it says return apply_filters( 'get_profile_info_keys', yadda yadda );

Anywhere it says “apply_filters” you can make your own.

So I haven’t done this myself yet, though now that I look closer at it, I think I’m going to rerelease my avatar plugin with this change.

Make a plug-in file in your my-plugins directory and put this in it:

add_filter( 'get_profile_info_keys', array('user_email' => array(1, __('Email')), 'user_url' => array(0, __('Website')), 'from' => array(0, __('Location')), 'occ' => array(0, __('Occupation')), etc....

And just keep adding stuff til you have everything you want. the ‘1’ in the “Email” part means that it’s required during registration. Everything else is 0’s because they are not required fields… you can, of course, change this.

Skip to toolbar