Info
- 9 posts
- 2 voices
- Started 2 years ago by Start Action
- Latest reply from johnhiler
- This topic is resolved
How to remove Occupation & Interest META data?
-
- Posted 2 years ago #
On the registeration page, it asks the user to enter in Occupation and Interest.
I want to completely remove these fields.
How?
-
- Posted 2 years ago #
That's not standard... did you add a plugin to support this? If so, turning off the plugin should do the trick. :-)
-
- Posted 2 years ago #
No plugin.
It's a clean RC install.
-
- Posted 2 years ago #
Ah I added some extra stuff to my profile using a plugin, so had always assumed Occupation and Interest were part of the plugin!
Doing more research now...
-
- Posted 2 years ago #
-
- Posted 2 years ago #
@johnhiler
Thanks, I'm looking into the database right now myself. ;)
If you find anything, please let me know. Back to looking myself
-
- Posted 2 years ago #
Hmm ... looks like it's hardcoded in the bb-include/functions.bb-core.php
/meta_key => (required?, Label, hCard property). Don't use user_{anything} as the name of your meta_key.
function bb_get_profile_info_keys( $context = null ) {
return apply_filters( 'get_profile_info_keys', array(
'first_name' => array(0, __('First name')),
'last_name' => array(0, __('Last name')),
'display_name' => array(1, __('Display name as')),
'user_email' => array(1, __('Email'), 'email'),
'user_url' => array(0, __('Website'), 'url'),
'from' => array(0, __('Location')),
'occ' => array(0, __('Occupation'), 'role'),
'interest' => array(0, __('Interests')),
), $context );
}Anyone know of a good way to remove Occupation and Interests without having to modify the bb-core.php file (to make future upgrading easier)
-
- Posted 2 years ago #
In case anyone is curious, I created the following plugin to remove the Occupation and Interests user profile meta data.
<?php
/*
Plugin Name: My Profile Fields
Description: My profile fields for my lovely forums
Version 1.0
*/function my_profile_fields( $fields ) {
unset( $fields['occ'] ); /* removes the Occupation profile field: */
unset( $fields['interest'] ); /* removes the Interests profile field: */
return $fields;
}
add_filter( 'get_profile_info_keys', 'my_profile_fields' );
?>
-
- Posted 2 years ago #
Ah ok, that looks pretty similar to johnbillion's plugin. Glad it worked out. :-)
-
You must log in to post.