[Gelöst] How to pass ID of the person performing the edit
Dieser Thread wurde gelöst. Hier ist eine Beschreibung des Problems und der Lösung.
Problem: I would like to capture information about the User who submitted a CRED edit post form so I can moderate submissions efficiently from wp-admin.
Solution: Use a generic field in the form to capture the current User's ID, then use the CRED API to do something with that information.
This support ticket is created vor 5 Jahre, 11 Monate. There's a good chance that you are reading advice that it now obsolete.
This is the technical support forum for Toolset - a suite of plugins for developing WordPress sites without writing PHP.
Everyone can read this forum, but only Toolset clients can post in it. Toolset support works 6 days per week, 19 hours per day.
No supporters are available to work today on Toolset forum. Feel free to create tickets and we will handle it as soon as we are online. Thank you for your understanding.
So when you get the information of the person making the edit. Is it that you want them to be a contributor automatically or is it that you will go in and manually set the role?
Thanks Shane,
Ive got that working. Im pushing both name and ID into separate fields, although that kind of seems odd. Im pretty sure there's probably a much better way of doing this.
Ideally Id like to see a photo of the person, their name and perhaps their profile URL (or be able to click on the profile photo which takes me to their profile page) so that I can quickly glance at it and know who made the change.
I just need a way to quickly identify who made the change, so that I can process it without having to muck around - incase I have hundreds of revisions to go through.
Ok, I now have the users name and ID passed via the form into the back end.
This means when moderating post edits, I have to look at the name, then look at the ID, then perform a search within users and match that up and then figure out what to do from there.
This probably wouldn't be an issue, but it's certainly going to become problematic, surely, if I end up with thousands of contributors.
I do apologise for the ongoing questions.
I'm just trying figure out how best to handle revisions by contributors in an efficient manner in the back end.
Again I just need to know who has made the revision (quickly) so I can either -
a) approve their submission, or
b) ban them because they've posted spam
Surely someone else has asked this question before?
This is relatively straight forward. I'll just keep a secondary tab open in the browser and if anyone submits nonsense Ill search under users by email address and drop the ban hammer.
Maybe use a WYSIWYG custom field to store a full link to the author's profile. For example, if you insert this code in a WYSIWYG field and show the "Visual" tab in wp-admin, you will be able to click the link to visit that URL directly from the post editor screen:
<a href="<em><u>hidden link</u></em>">someusername archive</a><br />
or
<a href="<em><u>hidden link</u></em>">User ID 12345</a>
It might save you some time during moderation.
So your CRED field might look something like this: