PluginProbe ʕ •ᴥ•ʔ
YITH WooCommerce Wishlist / 4.0.1
YITH WooCommerce Wishlist v4.0.1
4.16.0 trunk 2.1.0 2.1.1 2.1.2 2.2.0 2.2.1 2.2.10 2.2.11 2.2.12 2.2.13 2.2.14 2.2.15 2.2.16 2.2.17 2.2.2 2.2.3 2.2.4 2.2.5 2.2.6 2.2.7 2.2.8 2.2.9 3.0.0 3.0.1 3.0.10 3.0.11 3.0.12 3.0.13 3.0.14 3.0.15 3.0.16 3.0.17 3.0.18 3.0.19 3.0.2 3.0.20 3.0.21 3.0.22 3.0.23 3.0.25 3.0.3 3.0.4 3.0.5 3.0.6 3.0.7 3.0.8 3.0.9 3.1.0 3.1.1 3.10.0 3.11.0 3.12.0 3.13.0 3.14.0 3.15.0 3.16.0 3.17.0 3.18.0 3.19.0 3.2.0 3.20.0 3.21.0 3.22.0 3.23.0 3.24.0 3.25.0 3.26.0 3.27.0 3.28.0 3.29.0 3.3.0 3.30.0 3.31.0 3.32.0 3.33.0 3.34.0 3.35.0 3.36.0 3.37.0 3.38.0 3.4.0 3.5.0 3.6.0 3.7.0 3.8.0 3.9.0 4.0.0 4.0.1 4.1.0 4.10.0 4.10.1 4.10.2 4.11.0 4.12.0 4.13.0 4.14.0 4.15.0 4.2.0 4.3.0 4.4.0 4.5.0 4.6.0 4.7.0 4.8.0 4.9.0
yith-woocommerce-wishlist / plugin-fw / templates / components / notice-banner.php
yith-woocommerce-wishlist / plugin-fw / templates / components Last commit date
resources 2 years ago action-button.php 3 years ago list-items.php 3 years ago list-table-blank-state.php 4 years ago notice-banner.php 1 year ago notice.php 3 years ago tag.php 3 years ago
notice-banner.php
60 lines
1 <?php
2 /**
3 * Template for displaying the notice component
4 *
5 * @var array $component The component.
6 * @package YITH\PluginFramework\Templates\Components
7 */
8
9 defined( 'ABSPATH' ) || exit; // Exit if accessed directly.
10
11 list ( $component_id, $class, $attributes, $data, $notice_type, $banner_title, $message, $animate, $inline ) = yith_plugin_fw_extract( $component, 'id', 'class', 'attributes', 'data', 'notice_type', 'title', 'message', 'animate', 'inline' );
12
13 $allowed_types = array( 'info', 'warning', 'error' );
14
15 $notice_type = in_array( $notice_type ?? '', $allowed_types, true ) ? $notice_type : 'info';
16 $banner_title = $banner_title ?? '';
17 $message = $message ?? '';
18 $inline = $inline ?? true;
19 $animate = $animate ?? true;
20 $class = $class ?? '';
21
22 $icons = array(
23 'info' => '<svg data-slot="icon" fill="currentColor" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg" aria-hidden="true"><path clip-rule="evenodd" fill-rule="evenodd" d="M2.25 12c0-5.385 4.365-9.75 9.75-9.75s9.75 4.365 9.75 9.75-4.365 9.75-9.75 9.75S2.25 17.385 2.25 12Zm8.706-1.442c1.146-.573 2.437.463 2.126 1.706l-.709 2.836.042-.02a.75.75 0 0 1 .67 1.34l-.04.022c-1.147.573-2.438-.463-2.127-1.706l.71-2.836-.042.02a.75.75 0 1 1-.671-1.34l.041-.022ZM12 9a.75.75 0 1 0 0-1.5.75.75 0 0 0 0 1.5Z"></path></svg>',
24 'warning' => '<svg fill="currentColor" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg" aria-hidden="true"><path clip-rule="evenodd" fill-rule="evenodd" d="M9.401 3.003c1.155-2 4.043-2 5.197 0l7.355 12.748c1.154 2-.29 4.5-2.599 4.5H4.645c-2.309 0-3.752-2.5-2.598-4.5L9.4 3.003zM12 8.25a.75.75 0 01.75.75v3.75a.75.75 0 01-1.5 0V9a.75.75 0 01.75-.75zm0 8.25a.75.75 0 100-1.5.75.75 0 000 1.5z"></path></svg>',
25 'error' => '<svg fill="currentColor" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg" aria-hidden="true"><path clip-rule="evenodd" fill-rule="evenodd" d="M9.401 3.003c1.155-2 4.043-2 5.197 0l7.355 12.748c1.154 2-.29 4.5-2.599 4.5H4.645c-2.309 0-3.752-2.5-2.598-4.5L9.4 3.003zM12 8.25a.75.75 0 01.75.75v3.75a.75.75 0 01-1.5 0V9a.75.75 0 01.75-.75zm0 8.25a.75.75 0 100-1.5.75.75 0 000 1.5z"></path></svg>',
26 );
27
28 $icon = $icons[ $notice_type ] ?? '';
29
30 $allowed_icon_tags = array_merge( wp_kses_allowed_html( 'post' ), yith_plugin_fw_kses_allowed_svg_tags() );
31
32 $classes = array(
33 'yith-plugin-fw__notice-banner',
34 "yith-plugin-fw__notice-banner--{$notice_type}",
35 $inline ? 'yith-plugin-fw--inline' : '',
36 $animate ? 'yith-plugin-fw-animate__appear-from-top' : '',
37 $class,
38 );
39
40 $class = implode( ' ', array_filter( $classes ) );
41 ?>
42 <div
43 id="<?php echo esc_attr( $component_id ); ?>"
44 class="<?php echo esc_attr( $class ); ?>"
45 <?php echo yith_plugin_fw_html_attributes_to_string( $attributes ); ?>
46 <?php echo yith_plugin_fw_html_data_to_string( $data ); ?>
47 >
48 <div class="yith-plugin-fw__notice-banner__icon">
49 <?php echo wp_kses( $icon, $allowed_icon_tags ); ?>
50 </div>
51 <div class="yith-plugin-fw__notice-banner__content">
52 <div class="yith-plugin-fw__notice-banner__title">
53 <?php echo wp_kses_post( $banner_title ); ?>
54 </div>
55 <div class="yith-plugin-fw__notice-banner__message">
56 <?php echo wp_kses_post( $message ); ?>
57 </div>
58 </div>
59 </div>
60