• This seems like a rather basic thing that any site with multiple editors would need, but I can’t find it anywhere, in codex or via plugins.

    In my single.php code, I need to get the user id of the user that approved the post – ie: changed it from ‘pending’ to ‘publish’.

    As the admin, I need to know who to hold responsible for that action, and I want to credit them a percentage of the adshare, and perhaps even have an ‘approved by’ under the article.

    I don’t need to have who last revised the post, because either I or the author might update it again later. I need the user that actually published it.

    Does anyone know how I get that?

    Thanks,

    Chris

Viewing 3 replies - 1 through 3 (of 3 total)
  • Thread Starter christopheran

    (@christopheran)

    If there isn’t anything like this now, how difficult would it be to write a plugin for it – I guess there would be a way to grab the transition and user at the time, and put that in the db?

    cdukes

    (@walkinonwat3r)

    One way I think you could do this would be:
    -On post publish,
    -If custom field ‘authorizer’ is blank
    -Get the modified author
    -And add him to custom field ‘authorizer’

    Thread Starter christopheran

    (@christopheran)

    Hi Cooper,

    Thank you for your suggestion.

    I had the idea to add it to an existing plugin I was using, Peter’s Collaboration Emails. It had some code already triggered when an approval/publish took place, so we just fiddled with the code there.

    Couldn’t do it on my own though, got help at EE, here’s the solution we came up with:

    https://www.experts-exchange.com/Web_Development/Blogs/WordPress/Q_27887997.html

    Thanks again!

    Chris

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘How can I get who approved post for publishing, in single.php?’ is closed to new replies.