PluginProbe
Booking Calendar / 11.9
Booking Calendar v11.9
11.9 11.8.4 11.8.3 11.8.2 11.8.1 11.8 11.7 11.6.1 11.6 11.5 11.4.3 11.4.2 11.4.1 11.4 11.3 11.2.1 11.2 11.1 11.0 10.15.7 10.15.6 10.1.3 10.10 10.10.1 10.10.2 All 205 releases
booking / includes / page-setup-wizard / templates / settings-hint.php

settings-hint.php in Booking Calendar 11.9, at includes/page-setup-wizard/templates/settings-hint.php

46 lines 1.8 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2 /**
3 * Shared later-settings breadcrumb for Setup Wizard steps.
4 *
5 * @package Booking Calendar
6 * @var array<string,mixed> $template_context Authorized hint context.
7 */
8
9 if ( ! defined( 'ABSPATH' ) ) {
10 exit;
11 }
12
13 $settings_hint = isset( $template_context['settings_hint'] ) && is_array( $template_context['settings_hint'] )
14 ? $template_context['settings_hint']
15 : array();
16 $message = isset( $settings_hint['message'] ) && is_scalar( $settings_hint['message'] ) ? (string) $settings_hint['message'] : '';
17 $links = isset( $settings_hint['links'] ) && is_array( $settings_hint['links'] ) ? $settings_hint['links'] : array();
18 $renderable_links = array();
19
20 foreach ( $links as $link ) {
21 $link_label = isset( $link['label'] ) && is_scalar( $link['label'] ) ? (string) $link['label'] : '';
22 $link_url = isset( $link['url'] ) && is_scalar( $link['url'] ) ? (string) $link['url'] : '';
23 if ( '' !== $link_label && '' !== $link_url ) {
24 $renderable_links[] = array(
25 'label' => $link_label,
26 'url' => $link_url,
27 );
28 }
29 }
30
31 if ( '' !== $message && ! empty( $renderable_links ) ) :
32 ?>
33 <aside class="wpbc_setup_wizard__settings-hint" role="note">
34 <span class="wpbc_setup_wizard__settings-hint-message"><?php echo esc_html( $message ); ?> <span aria-hidden="true">&mdash;</span></span>
35 <nav class="wpbc_setup_wizard__settings-hint-path" aria-label="<?php esc_attr_e( 'Where to change these settings later', 'booking' ); ?>">
36 <?php foreach ( $renderable_links as $link_index => $link ) : ?>
37 <?php if ( 0 < $link_index ) : ?>
38 <span class="wpbc_setup_wizard__settings-hint-separator" aria-hidden="true">&rsaquo;</span>
39 <?php endif; ?>
40 <a href="<?php echo esc_url( $link['url'] ); ?>"><?php echo esc_html( $link['label'] ); ?></a>
41 <?php endforeach; ?>
42 </nav>
43 </aside>
44 <?php
45 endif;
46