/var/www/html/wp-content/plugins/yith-woocommerce-compare/plugin-fw/templates/components/notice.php


1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
<?php
/**
 * Template for displaying the notice component
 *
 * @var array $component The component.
 * @package YITH\PluginFramework\Templates\Components
 */

defined'ABSPATH' ) || exit; // Exit if accessed directly.

list ( $component_id$class$attributes$data$notice_type$message$dismissible$animate$inline ) = yith_plugin_fw_extract$component'id''class''attributes''data''notice_type''message''dismissible''animate''inline' );

$notice_type $notice_type ?? 'info';
$message     $message ?? '';
$dismissible $dismissible ?? true;
$animate     $animate ?? true;
$inline      $inline ?? true;
$class       $class ?? '';

$classes = array(
    
'yith-plugin-fw__notice',
    
"yith-plugin-fw__notice--{$notice_type}",
    
$animate 'yith-plugin-fw-animate__appear-from-top' '',
    
$inline 'yith-plugin-fw--inline' '',
    
$class,
);

$class implode' 'array_filter$classes ) );
?>
<div
        id="<?php echo esc_attr$component_id ); ?>"
        class="<?php echo esc_attr$class ); ?>"
    <?php echo yith_plugin_fw_html_attributes_to_string$attributes ); ?>
    <?php echo yith_plugin_fw_html_data_to_string$data ); ?>
>
    <?php echo wp_kses_post$message ); ?>

    <?php if ( $dismissible ) : ?>
        <span class="yith-plugin-fw__notice__dismiss"></span>
    <?php endif; ?>
</div>