WordPress.org

Ready to get started?Download WordPress

Forums

current_user_can and scheduled posts (2 posts)

  1. Steve
    Member
    Posted 4 years ago #

    Can someone confirm this behaviour for me:

    If I have a hook on publish_post which does some things to the post, and that code has a current_user_can check then it works fine when the user is posting immediately.

    If however they schedule the post then the current_user_can check in my code block fails.

    It would seem that when posts are scheduled WP looses the user_ID context - which I can see in a way because they aren't actually publishing it but.......

  2. Steve
    Member
    Posted 4 years ago #

    It also seems to lose the post_ID as well

Topic Closed

This topic has been closed to new replies.

About this Topic