lfbsilva
Forum Replies Created
-
Forum: Plugins
In reply to: [Site Reviews] Is site-reviews/get/review working?Paul, your work is incredible. Wonderful support. I will contribute to your project. Unfortunately there is a very big difference between the value of our coins and my financial collaboration will not be much for you, but it will be a way to pay some of the time you have dedicated.
Thanks for all
Forum: Plugins
In reply to: [Site Reviews] Is site-reviews/get/review working?Thank you, but in this case i must elevate role of users.
I prefere do this,
add_action('site-reviews/review/build/before', function ($review) { if (isset($review['assigned_users']) && count($review->assigned_users)> 0 ){ um_fetch_user($review->assigned_users[0] ); $review->set('avatar', um_get_avatar_uri( um_profile('profile_photo'), 40 )); $user_info = get_userdata($review->assigned_users[0]); $review->set('author', $user_info->display_name); } else { $review->set('author', 'Anonymous'); } return $review; });Author was assigned correctly!!! But, avatar has not changed!
Avatar url from UM is ok (i tested). But $review->set(‘avatar’, URL) not change the url.
Shouldn’t it work the same way?Forum: Plugins
In reply to: [Site Reviews] Is site-reviews/get/review working?The ‘site-reviews/review/build/before’ is perfect!! Thank you!!
The initial assign is ok (in the form). I do not have problems. But when i reassign (editing) the user do not change in review.
Do I need to create a function to reassign one user and change the author info?Forum: Plugins
In reply to: [Site Reviews] Is site-reviews/get/review working?Another thing. If you assigned a user, why the author is not this user?
Can i do this?