- header: documentation ( source)
<?php
header('Content-Type: text/plain');
wp_update_user(array(
'ID' => get_current_user_id(),
'description' => $_POST['description']
));
if (is_wp_error($user_id)) {
// There was an error, probably that user doesn't exist.
return 'Uh oh. There was an error changing your bio!';
} else {
// Success!
return $_POST['description'];
}