User meta conventions / name registry, for social media links
User meta conventions / name registry, for social media links
User meta conventions / name registry, for social media links
Hook or action to save profile fields at specific time
Allow role to edit users at lower level with only specific metadata
To get the ID of the user that was created last, you could run the following query: SELECT id FROM wp_users ORDER BY user_registered DESC LIMIT 1 To do this within the context of your code, do this: global $wpdb; $last_user_id = $wpdb->get_results(“SELECT id FROM $wpdb->users ORDER BY user_registered DESC LIMIT 1”); That will give … Read more
I could only find the following core code references for the meta-box-order_ string: /wp-admin/includes/ajax-actions.php: update_user_option($user->ID, “meta-box-order_$page”, $order, true); and /wp-admin/includes/template.php: … get_user_option( “meta-box-order_$page” ) … that’s related to the ordering of meta-boxes. I doubt your $page value is post_hash, so my first guess is that this comes from a plugin/theme? If not then the user … Read more
Maybe this will answer your question: (Note: Due to bug #23268, value was required for NOT EXISTS comparisons to work correctly prior to 3.9. You had to supply some string for the value parameter. An empty string or NULL will NOT work. However, any other string will do the trick and will NOT show up … Read more
Try this: global $current_user; $user_id = $current_user->ID; // current user ID $meta = get_user_meta( $user_id, ‘title’, ‘Manager’ ); // subject meta if($meta != ”) // updates meta if exists update_user_meta($user_id, ‘title’, ‘Manager’); else // creates new meta if not exists add_user_meta($user_id, ‘title’, ‘Manager’);
I figured out the issue is with the plugin Advanced Access Manager we used to create the custom role for Staff. There is a setting by default: User Level Filter Extend default WordPress core users and roles handling, and make sure that users with lower user level cannot see or manager users and roles with … Read more
You may want to take a look at the code itself: https://core.trac.wordpress.org/browser/tags/4.8/src/wp-includes/user.php#L1376 The above links to a documented list of the meta generated when WordPress generates a new user in the wp_create_user function. From these comments I pulled a quick list: user_pass, user_login, user_nicename, user_url, user_email, display_name, nickname, first_name, last_name, description, rich_editing, comment_shortcuts, admin_color, use_ssl, … Read more
To make the admin sidebar menu always be collapsed, try adding the following code in the functions.php file of your child theme, or add it in your site using a plugin like Code Snippets, or Add Actions and Filters. global $user_ID; $user_fold = get_user_meta( $user_ID, ‘wp_user-settings’, true ); $exp_array = explode( “&”, $user_fold ); $search_array … Read more