published( 3 ); if ( ! $pages ) { echo '

' . esc_html__( 'Your booking form is not on a published page yet. Publish it to get a link and a QR code to share.', 'abientot' ) . '

'; if ( current_user_can( 'edit_pages' ) ) { $url = add_query_arg( array( 'post_type' => 'page', 'post_title' => rawurlencode( __( 'Book an appointment', 'abientot' ) ), 'content' => rawurlencode( '[abientot_booking_form]' ), // WordPress escapes prefilled content, so a block comment would not survive. ), admin_url( 'post-new.php' ) ); echo '

' . esc_html__( 'Create a booking page', 'abientot' ) . '

'; } echo '

' . esc_html__( 'You can also add the shortcode [abientot_booking_form] or the Abientot Booking Form block to any page.', 'abientot' ) . '

'; return; } foreach ( $pages as $page ) { echo '
'; echo '

' . esc_html( '' !== $page['title'] ? $page['title'] : __( 'Booking page', 'abientot' ) ) . '
' . esc_html( $page['url'] ) . '

'; echo '

'; echo ' '; echo ''; echo '

'; } echo '
' . esc_html__( 'Where to share your booking link', 'abientot' ) . '

' . esc_html__( 'Before sharing, open the link in a private browser window and make a test booking.', 'abientot' ) . '

'; } }