• Resolved Nicola Peluchetti

    (@nicolapeluchetti)


    Hi, I just wanted to know if there was a way to include transitions to Custom Post statuses in easily ( so with the standard merge tags you have for example when a post is published ) as triggers.
    Right now I use a custom trigger, but I need to redefine all the standard merge tags, which is fine, just wanted to know if there was an easier way around this, like maybe extending one of your triggers.

Viewing 1 replies (of 1 total)
  • Plugin Author Kuba Mikita

    (@kubitomakita)

    Good call!

    You could extend the Post Approved trigger and just override the constructor.

    Line 38 where the action is defined has the actual transition action:

    $this->add_action( "{$from_status}_to_{$to_status}", 10 );

Viewing 1 replies (of 1 total)
  • The topic ‘Custom Post Status transition trigger’ is closed to new replies.