Skip to content

Entry save event context detection #9126

Discussion options

You must be logged in to vote

This is possible as of Craft 3.7 thanks to some publishing workflow improvements (#7899). Going forward, if a draft wasn’t explicitly created by the author, it will be considered a “provisional draft”. So you can test for that:

if ($entry->isProvisionalDraft) {
    // This is a provisional draft
}

Replies: 2 comments 5 replies

Comment options

You must be logged in to vote
1 reply
@rob-baker-ar
Comment options

Comment options

You must be logged in to vote
4 replies
@rob-baker-ar
Comment options

@brandonkelly
Comment options

@rob-baker-ar
Comment options

@brandonkelly
Comment options

Answer selected by brandonkelly
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Ideas
Labels
extensibility 🔌 features related to plugin/module dev
3 participants