update_user_meta($current_user->ID, 'last_name', esc_attr($_POST['last_name'])); update_user_meta($current_user->ID, 'description', esc_attr($_POST['description'])); update_user_meta($current_user->ID, 'url', esc_attr($_POST['url'])); update_user_meta($current_user->ID, 'nickname', esc_attr($_POST['nickname'])); update_user_meta($current_user->ID, 'display_email', esc_attr($_POST['display_email'])); update_user_meta($current_user->ID, 'facebook', esc_attr($_POST['facebook'])); update_user_meta($current_user->ID, 'twitter', esc_attr($_POST['twitter'])); update_user_meta($current_user->ID, 'instagram', esc_attr($_POST['instagram'])); // Redirect so the page will show updated info. // I am not Author of this Code- i dont know why but it worked for me after changing below line to if ( count($error) == 0 ){ if (count($error) == 0) { //action hook for plugins and extra fields saving do_action('edit_user_profile_update', $current_user->ID); do_action('personal_options_update', $current_user->ID); $av = new Simple_Local_Avatars(); $av->edit_user_profile_update($current_user->ID); wp_redirect(get_permalink()); exit; } } else { if ('GET' == $_SERVER['REQUEST_METHOD'] && !empty($_GET['action']) && $_GET['action'] == 'remove-simple-local-avatar' && $current_user->ID == $_GET['user_id']) { $av = new Simple_Local_Avatars(); $av->avatar_delete($current_user->ID); wp_redirect(get_permalink()); exit; } } get_header(); btc_breadcrumbs(); $current_post = $post; ?>
* @since Tufts Great Diseases 1.0 */ get_header(); ?> <?php // Author object $user_obj = get_queried_object(); // If we are looking at our own page, check if we've uploaded a picture if ($user_obj->ID == get_current_user_id()) { if (class_exists('Simple_Local_Avatars')) { $local_avatar = new Simple_Local_Avatars(); if (isset($_POST['delete_avatar'])) { $local_avatar->avatar_delete($user_obj->ID); } else { $local_avatar->edit_user_profile_update($user_obj->ID); } } } ?> <div class="content-sidebar-wrapper"> <?php get_sidebar(); ?> <div id="content-wrapper"> <div id="breadcrumb"> <?php if (class_exists('bcn_breadcrumb_trail')) {