PluginProbe ʕ •ᴥ•ʔ
WP STAGING – WordPress Backup, Restore, Migration & Clone / 4.7.0
WP STAGING – WordPress Backup, Restore, Migration & Clone v4.7.0
4.9.3 4.9.2 4.9.1 4.9.0 4.8.1 trunk 3.0.0 3.0.1 3.0.2 3.0.3 3.0.4 3.0.5 3.0.6 3.1.0 3.1.1 3.1.2 3.1.3 3.1.4 3.10.0 3.2.0 3.3.1 3.3.2 3.3.3 3.4.1 3.4.3 3.5.0 3.6.0 3.7.1 3.8.0 3.8.1 3.8.2 3.8.3 3.8.4 3.8.5 3.8.6 3.8.7 3.9.0 3.9.1 3.9.2 3.9.3 3.9.4 4.0.0 4.1.0 4.1.1 4.1.2 4.1.3 4.1.4 4.2.0 4.2.1 4.3.0 4.3.1 4.3.2 4.4.0 4.5.0 4.6.0 4.7.0 4.7.1 4.7.2 4.7.3 4.8.0
wp-staging / views / components / alert.php
wp-staging / views / components Last commit date
alert.php 7 months ago checkbox.php 9 months ago toggle.php 7 months ago
alert.php
62 lines
1 <?php
2
3 /**
4 * Alert component.
5 * @var string $title
6 * @var string $desc
7 * @var string $buttonText
8 * @var string $buttonUrl
9 * @var bool $closeable
10 * @var string $id
11 * @var string $style
12 * @var string $class
13 *
14 * @package WPStaging\Component
15 * @see \WPStaging\Component\Alert::render()
16 */
17 ?>
18 <div
19 <?php if (!empty($id)) : ?>
20 id="<?php echo esc_attr($id); ?>"
21 <?php endif; ?>
22 class="wpstg-banner <?php echo esc_attr($class);?>"
23 style="<?php echo esc_attr($style); ?>">
24 <div class="wpstg-banner-content">
25 <div class="wpstg-banner-icon">
26 <svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="#ef4444"
27 stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
28 <path fill="none" d="M10.29 3.86L1.82 18a2 2 0 0 0 1.71 3h16.94a2 2 0 0 0 1.71-3L13.71 3.86a2 2 0 0 0-3.42 0z"></path>
29 <line x1="12" y1="9" x2="12" y2="13"></line>
30 <line x1="12" y1="17" x2="12.01" y2="17"></line>
31 </svg>
32 </div>
33 <div class="wpstg-banner-text">
34 <?php if (!empty($title)) : ?>
35 <h3 class="wpstg-banner-title">
36 <?php echo esc_html($title); ?>
37 </h3>
38 <?php endif; ?>
39
40 <?php if (!empty($desc)) : ?>
41 <p class="wpstg-banner-description">
42 <?php echo wp_kses_post($desc); ?>
43 </p>
44 <?php endif; ?>
45
46 <?php if (!empty($buttonText)) : ?>
47 <?php
48 $url = !empty($buttonUrl) ? esc_url($buttonUrl) : '#';
49 ?>
50 <a href="<?php echo esc_url($url); ?>" target="_blank" rel="noopener" class="wpstg-button danger wpstg-banner-button">
51 <?php echo esc_html($buttonText); ?>
52 </a>
53 <?php endif; ?>
54 </div>
55 </div>
56 <?php if ($closeable) : ?>
57 <div class="wpstg-banner-close" title="<?php esc_attr_e('Close', 'wp-staging'); ?>">
58 <svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="wpstg-banner-close-icon"><path d="M18 6 6 18"/><path d="m6 6 12 12"/></svg>
59 </div>
60 <?php endif; ?>
61 </div>
62