In Review -> Published. * * It is only a SEED. On activation it is copied into the `ostew_workflows` option, * which then becomes the source of truth and can be edited or replaced from * Editorial Workflow -> Tools (JSON import/export). The `ostew/workflows` filter * allows a final code-level override for locked-down installs. * * Richer starting points (compliance gate, escalation, section-scoping) ship as * importable JSON in /examples. * * @package OST\EditorialWorkflow * @return array Workflows keyed by workflow id. */ if ( ! defined( 'ABSPATH' ) ) { exit; } return array( 'default' => array( 'id' => 'default', 'label' => __( 'Editorial Approval', 'ost-editorial-workflow' ), 'post_types' => array( 'post', 'page' ), 'steps' => array( array( 'status' => 'draft', 'actor_roles' => array( 'author', 'contributor', 'editor', 'administrator' ), 'advance_label' => __( 'Submit for Review', 'ost-editorial-workflow' ), 'advance_to' => 'ostew_review', ), array( 'status' => 'ostew_review', 'label' => __( 'In Review', 'ost-editorial-workflow' ), // Administrators can always act via the manage_options bypass, so they are // intentionally NOT listed here - that keeps them off the notification list. 'approver_roles' => array( 'editor' ), 'on_approve' => 'publish', 'on_reject' => 'draft', ), array( 'status' => 'publish', ), ), 'notifications' => array( array( 'on_status' => 'ostew_review', 'notify' => 'approver_roles', 'channels' => array( 'email', 'dashboard' ), 'template' => 'review_request', ), array( 'on_status' => 'publish', 'notify' => 'author', 'channels' => array( 'email' ), 'template' => 'published', ), array( 'on_status' => 'draft', 'when_from' => array( 'ostew_review' ), 'notify' => 'author', 'channels' => array( 'email', 'dashboard' ), 'template' => 'sent_back', ), ), // No SLA timers by default - opt in per status. See /examples. 'escalation' => array(), // Section-scoping is off by default. See /examples. 'scoping' => array( 'enabled' => false, ), ), );