Tag Info

New answers tagged

0

You are trying to access the meta data of the user with ID stored in $user->ID but the object $user is not defined in your code. You are also using an undefined variable $user_ID. The quickest fix in your code would be to change this: get_the_author_meta( 'province', $user->ID ) ) With: get_the_author_meta( 'province', $userdata->ID ) ) Tip: ...


1

Something like this should point you in the right direction: function updateUser($newPassword = '', $newEmail = ''){ $update = array(); if(!empty($newPassword)) $update['user_pass'] = $newPassword; if(!empty($newEmail)) $update['user_email'] = $newEmail; if(!empty($update)){ $update['ID'] = wp_get_current_user_id(); ...


2

What about just targeting with CSS? tr.user-nickname-wrap { display: none; } Of course the fields will still be in the source but the CSS targeting will be faster than JS. You can load your WP Admin CSS this way: function wse_183286_profile_admin_css() { $screen_id = isset( get_current_screen()->id ) ? get_current_screen()->id : null; if ( ...



Top 50 recent answers are included