PluginProbe
StoreEngine — Complete eCommerce Solution with Memberships, Licensing, Affiliates & More / 2.2.0
StoreEngine — Complete eCommerce Solution with Memberships, Licensing, Affiliates & More v2.2.0
2.3.0 2.2.0 2.1.1 2.1.0 2.0.0 1.10.0 1.9.1 1.9.0 1.2.1 1.2.2 1.3.0 1.3.1 1.3.2 1.3.3 1.4.0 1.5.0 1.5.1 1.5.2 1.5.3 1.5.4 1.5.5 1.5.6 1.5.7 1.5.8 1.6.0 All 59 releases
storeengine / includes / admin / notice-html.php

notice-html.php in StoreEngine — Complete eCommerce Solution with Memberships, Licensing, Affiliates & More 2.2.0, at includes/admin/notice-html.php

45 lines 1.9 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2 /**
3 * Notice template.
4 *
5 * @var string $notice_key
6 * @var string $classes
7 * @var array $notice
8 */
9
10 if ( ! defined( 'ABSPATH' ) ) {
11 exit;
12 }
13
14 ?>
15 <div id="storeengine-admin-notice-<?php echo esc_attr( $notice['key'] ); ?>" class="<?php echo esc_attr( $classes ); ?>" role="alert">
16 <?php if ( $notice['icon'] ) { ?>
17 <span class="storeengine-admin-notice__icon" aria-hidden="true">
18 <?php echo \StoreEngine\Admin\Notices::get_svg_icon( $notice['icon'] ); // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped -- Controlled inline SVG built from a static whitelist. ?>
19 </span>
20 <?php } ?>
21
22 <div class="storeengine-admin-notice__body">
23 <?php if ( $notice['title'] ) { ?>
24 <h3 class="storeengine-admin-notice__title"><?php echo esc_html( $notice['title'] ); ?></h3>
25 <?php } ?>
26 <div class="storeengine-admin-notice__content"><?php echo wp_kses_post( $notice['message'] ); ?></div>
27 </div>
28
29 <?php if ( $notice['has_buttons'] ) { ?>
30 <div class="storeengine-admin-notice__actions">
31 <?php if ( $notice['button_text'] && $notice['button_action'] ) { ?>
32 <a class="<?php echo esc_attr( $notice['button_class'] ?: 'storeengine-btn storeengine-btn--md storeengine-btn--preset-blue' ); ?>" href="<?php echo esc_url( $notice['button_action'] ); ?>"<?php echo ! empty( $notice['button_target'] ) ? ' target="' . esc_attr( $notice['button_target'] ) . '"' : '' ?>>
33 <?php echo esc_html( $notice['button_text'] ); ?>
34 </a>
35 <?php } ?>
36 <?php if ( $notice['dismissible'] ) { ?>
37 <button class="storeengine-admin-notice-close notice-dismiss" data-notice="<?php echo esc_attr( $notice['key'] ); ?>" aria-label="<?php esc_attr_e( 'Dismiss this notice', 'storeengine' ); ?>">
38 <?php echo \StoreEngine\Admin\Notices::get_svg_icon( 'close' ); // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped -- Controlled inline SVG built from a static whitelist. ?>
39 </button>
40 <?php } ?>
41 </div>
42 <?php } ?>
43 </div>
44 <?php
45