How can I make the user names of commentors clickable links to the user’s profile from the admin comment screen?
How can I make the user names of commentors clickable links to the user’s profile from the admin comment screen?
How can I make the user names of commentors clickable links to the user’s profile from the admin comment screen?
untested but should work add_filter(‘the_content’,’update_user_score’); function update_user_score($content){ global $post; $counter = 0; $score = get_post_meta( $post->ID, ‘ratings_score’, true ); $counter += $score; update_user_meta( $post->post_author, ‘user_score’, $counter); return $content; }
You can use update_user_meta() and add_user_meta(), just store all the email addresses in an array in a new field. If you have a requirement, such as preventing duplicates, run a validation function that checks for that before updating the database.
install a fresh wordpress setup on your local machine and then have a look at wp_usersmeta table . It contains meta(additional) information for each user.You (admin) can also make data entry specific to any user by this function update_user_meta() in usermeta table. and retrive the same using get_user_meta() funciton. All fields for all users are … Read more
To fetch users with certain meta field, you can use WP_User_Query class. Check codex manual for it. So you can create a custom shortcode like this: add_shortcode( ‘listusers’, ‘wpse8170_listusers’ ); function wpse8170_listusers( $atts, $content=”” ) { $atts = shortcode_atts( array( ‘company’ => false ), $atts ); if ( empty( $atts[‘company’] ) ) return $content; $query … Read more
Frontend Image Upload
This is because there is no meta key named display_name, so if you want to update a single meta value better use update_user_meta instead of wp_update_user, as update_user_meta() will create the meta field if it doesn’t exist. like if ( !empty( $_POST[‘display_name’] ) ) { update_user_meta( $current_user->ID, ‘display_name’, esc_attr( $_POST[‘display_name’] ) ); } Then you … Read more
I think this can handle, what you want: Here is the filter documentation http://www.advancedcustomfields.com/resources/filters/acf_update_value/ You can choose whatever filter option you want, but if you use onw of the first two add_filter(‘acf/update_value’, ‘mr_acf_prevent_update’, 10, 3); add_filter(‘acf/update_value/type=text’, ‘mr_acf_prevent_update’, 10, 3); You’ll have to write more conditionals on the callback function. If you use one of these … Read more
How to save the date/time of last update of an extra user profile field?
Two ways I can think of: you could use a MySQL statement to get all usermeta matching an ID in the wp_usermeta table. That would get the custom meta as well, but it would also get other user settings that I don’t think you want. The other way is to define an array with all … Read more