Skip to:
Content
Pages
Categories
Search
Top
Bottom

Re: PROFILE – user specified fields


ardentfrost
Member

@ardentfrost

I think he means he wants the ability to add new ones or take away some on his own, possibly through a nice interface. It’s not a bad idea.

For now, though, if you want to change it, make a file in your my-plugins directory and put this in it:

<?php

function get_profile_info_keys_personal() {

return array('user_email' => array(1, __('Email')), 'user_url' => array(0, __('Website')), 'from' => array(0, __('Location')), 'occ' => array(0, __('Occupation')), 'interest' => array(0, __('Interests')));

}

add_filter('get_profile_info_keys', 'get_profile_info_keys_personal');

?>

Then you can add or take away whatever you want.

However, you will need to know a little more about how other plugins work. For instance if you use my avatar plugin, you would need to add into that file 'avatar_loc' => array(0,__('Avatar URL')) (into that long line) and comment out part of my plugin.

A plugin to do all of that automatically wouldn’t be hard, but would need to be done in such a way so that people can write plugins to interface it (so, for instance, I could interface it from my avatar plugin to make sure that the part I need is inserted into the line).

I only mention that so that if anyone decides to tackle the plugin before I do, they’re sure to account for that ;)

Skip to toolbar