__( 'Monday', 'unsupervised-schedular' ), 'slots' => [ [ '16:00–16:30', 30 ], [ '16:30–17:00', 30 ], ], ], [ 'label' => __( 'Wednesday', 'unsupervised-schedular' ), 'slots' => [ [ '17:00–17:45', 45 ], ], ], ]; $dayHtml = ''; foreach ( $days as $day ) { $slotHtml = ''; foreach ( $day['slots'] as $slot ) { $slotHtml .= sprintf( '
%s (%d min)
', esc_html( $slot[0] ), (int) $slot[1], esc_html__( 'Book', 'unsupervised-schedular' ) ); } $dayHtml .= sprintf( '

%s

%s
', esc_html( $day['label'] ), $slotHtml ); } return sprintf( '
%s
%s
', self::note( __( 'Editor preview — students see live availability on the published page.', 'unsupervised-schedular' ) ), $dayHtml ); } public static function groupClasses(): string { return sprintf( '
%s

%s

%s

%s

25.00 CAD

', self::note( __( 'Editor preview — students see live group classes on the published page.', 'unsupervised-schedular' ) ), esc_html__( 'Beginner Group Class', 'unsupervised-schedular' ), esc_html__( 'Saturdays 10:00–11:00', 'unsupervised-schedular' ), esc_html__( 'A sample class shown so the page can be styled.', 'unsupervised-schedular' ), esc_html__( 'Enrol', 'unsupervised-schedular' ) ); } /** * The live login form renders fine without any request state, so the * preview includes the real template (the editing user is logged in, which * would otherwise short-circuit to an "already logged in" message). */ public static function login(): string { $error = ''; ob_start(); include USC_PLUGIN_DIR . 'templates/frontend/login-page.php'; return self::note( __( 'Editor preview — logged-in visitors are offered a link to the booking page instead.', 'unsupervised-schedular' ) ) . (string) ob_get_clean(); } public static function registration(): string { $fields = sprintf( '

', esc_html__( 'Email', 'unsupervised-schedular' ) ); $fields .= sprintf( '

', esc_html__( 'Your name', 'unsupervised-schedular' ) ); $fields .= sprintf( '

', esc_html__( 'Password', 'unsupervised-schedular' ) ); $fields .= sprintf( '

', esc_attr__( 'Create Account', 'unsupervised-schedular' ) ); return sprintf( '
%s
%s
', self::note( __( 'Editor preview — the live form requires a valid invite link and lists signup policies.', 'unsupervised-schedular' ) ), $fields ); } private static function note( string $text ): string { return '

' . esc_html( $text ) . '

'; } }