$template_context Authorized step context. */ if ( ! defined( 'ABSPATH' ) ) { exit; } $draft = $template_context['draft']; $step_data = $template_context['step_data']; $journey = isset( $step_data['journey'] ) && is_array( $step_data['journey'] ) ? $step_data['journey'] : array(); $groups = isset( $step_data['groups'] ) && is_array( $step_data['groups'] ) ? $step_data['groups'] : array(); $is_completed = 'completed' === $draft['status']; $step_count = isset( $journey['journey'] ) && is_array( $journey['journey'] ) ? count( $journey['journey'] ) : 0; $email_state = isset( $step_data['email_state'] ) && is_array( $step_data['email_state'] ) ? $step_data['email_state'] : array(); $email_error = isset( $step_data['email_error'] ) && is_scalar( $step_data['email_error'] ) ? (string) $step_data['email_error'] : ''; ?>