Tell us what you are trying to do?
First off, thank you for Toolset. This plugin has made my experience with wordpress amazing and I have found answers to all of my questions through your support documentation, which is incredibly thorough and impressive. So thank you.
I am updating the current user role when they submit a post form. Here is where I am at currently:
add_action('update_role_action', 'update_role',10,1);
function update_role($form_data)
{
if ( is_user_logged_in() ) {
if ($form_data['id']=='495')
{
$current_user = wp_get_current_user();
$current_user->set_role('editor');
}
} else { }
}
do_action('update_role_action', 495);
I am currently learning PHP so any advice is much appreciated.