diff options
Diffstat (limited to 'wp-admin/profile-update.php')
-rw-r--r-- | wp-admin/profile-update.php | 34 |
1 files changed, 34 insertions, 0 deletions
diff --git a/wp-admin/profile-update.php b/wp-admin/profile-update.php new file mode 100644 index 0000000..4d6595b --- /dev/null +++ b/wp-admin/profile-update.php @@ -0,0 +1,34 @@ +<?php + +$parent_file = 'profile.php'; +$submenu_file = 'profile.php'; +require_once('admin.php'); + +check_admin_referer('update-profile_' . $user_ID); + +if ( !$_POST ) + die( __('No post?') ); + +$errors = edit_user($user_ID); + +if ( is_wp_error( $errors ) ) { + foreach( $errors->get_error_messages() as $message ) + echo "$message<br />"; + exit; +} + +if ( !isset( $_POST['rich_editing'] ) ) + $_POST['rich_editing'] = 'false'; +update_user_option( $current_user->id, 'rich_editing', $_POST['rich_editing'], true ); + +do_action('personal_options_update'); + +if ( 'profile' == $_POST['from'] ) + $to = 'profile.php?updated=true'; +else + $to = 'profile.php?updated=true'; + +wp_redirect( $to ); +exit; + +?> |