Skip to:
Content
Pages
Categories
Search
Top
Bottom

Re: Change Profile information

Here’s where I’m at. if I modify the function get_profile_info_keys in /wpmu/bbpress/bb-includes/functions.php and change the definition of get_profile_info_keys to what I want, it’s all good. I changed the text to make it fit and apologize for poor formatting. The downside here is I am changing bbpress code, not my own template. There was no documentation indicating get_profile_info_keys is eligible for being plugged in, but it seems like it is. So I tried hardcoding first to see if this obtained the desired results. It did. The profile info prompts displayed correctly on registration page, the data was written the appropriate usermeta table, and viewing the profile displays the newly named fields and shows correct data. So far so good. Below is the code (sorry for poor formatting). Of course, the fatal flaw here is this NEEDS to be done in a plugin. So now I will tackle this. If anyone has a plugin sample for bbpress that shows modification of profile_info_keys I would be very grateful to take a peek. I believe by tomorrow I will have this hashed out and working properly as a plugin with no changes to core bbpress code. I will share that code here when I get there. In the meantime, feel free to flame, compliment, empower, disempower, or any other useful feedback! I am heading into no man’s land…

//meta_key => (required?, Label). Don’t use user_{anything} as the name of your meta_key.

function get_profile_info_keys() {

return apply_filters(

‘get_profile_info_keys’,

array(

‘user_email’ => array(1, __(‘Email’)),

‘tip’ => array(0, __(‘A tip you would like to share?’)), ‘favorite’ => array(0, __(‘Favorite products?’)),

‘more’ => array(0, __(‘How are you getting more?’)),

‘interest’ => array(0, __(‘Hobbies/interests?’))) );

/* original array follows

array(

‘user_email’ => array(1, __(‘Email’)),

‘user_url’ => array(0, __(‘Website’)),

‘from’ => array(0, __(‘Location’)),

‘occ’ => array(0, __(‘Occupation’)), ‘

interest’ => array(0, __(‘Interests’))) );

*/

What I’d love is to see someone has tread in these waters and knows how to use a plugin to implement an overridden get_profile_info_keys. I’m getting old for these all night programming marathons. It was fun the first three decades, but now the arthritis flares up and I have to break to take my Centrum Silver… So all help will result in admiration from me to you! Ships ahoy.

Skip to toolbar