Skip to content

transition_post_status runs twice with same old and new status #15094

@RavanH

Description

@RavanH

Describe the bug
When submitting a post update or an new post, it appears the transition_post_status hook(s) get called twice. First without the is_admin flag, then with is_admin passing true. The result may be unexpected as actions may behave differently or different actions may be included in both runs.

Please note this behavior is not seen with the classic editor.

Related issue #12897

To reproduce
I'll write a quick test plugin to show what is happening and how it may affect behavior...

Metadata

Metadata

Assignees

No one assigned

    Labels

    REST API InteractionRelated to REST API[Type] BugAn existing feature does not function as intended

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions