PluginProbe
Metricool – Social media and site statistics / trunk
Metricool – Social media and site statistics vtrunk
2.1.0 2.0.2 2.0.1 2.0.0 1.27 trunk
metricool / views / admin / notices / layout.php

layout.php in Metricool – Social media and site statistics trunk, at views/admin/notices/layout.php

56 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 if (!defined('ABSPATH')) {
4 exit;
5 }
6
7 /**
8 * Standardized admin notice layout view
9 *
10 * @var string $logoUrl
11 * @var string $noticeId
12 * @var bool $isDismissable
13 * @var bool $isSnoozable
14 * @var string $ctaUrl
15 * @var string $ctaLabel
16 * @var string $restUrl
17 * @var string $content
18 * @var string $nonce
19 * @var string $wpNonce
20 */
21 ?>
22 <div id="rsp-metricool-notice-<?php echo esc_attr($noticeId); ?>"
23 class="fade notice rsp-metricool-admin-notice <?php echo is_rtl() ? 'rtl' : 'ltr'; ?>"
24 data-rest-url="<?php echo esc_url($restUrl); ?>"
25 data-nonce="<?php echo esc_attr($nonce); ?>"
26 data-wp-nonce="<?php echo esc_attr($wpNonce); ?>">
27 <div class="rsp-metricool-container">
28 <div class="rsp-metricool-admin-notice-image">
29 <img src="<?php echo esc_url($logoUrl); ?>" alt="metricool-logo">
30 </div>
31 <div class="rsp-metricool-content">
32 <?php if ($isDismissable) : ?>
33 <button type="button" class="rsp-metricool-dismiss" aria-label="<?php esc_attr_e('Dismiss', 'metricool'); ?>" data-notice-action="dismiss">
34 <span class="dashicons dashicons-no-alt"></span>
35 </button>
36 <?php endif; ?>
37 <?php
38 // render the content of the notice
39 echo wp_kses_post($content);
40 ?>
41 <div class="rsp-metricool-buttons-row">
42 <?php if (!empty($ctaUrl)) : ?>
43 <a class="button" href="<?php echo esc_url($ctaUrl); ?>">
44 <?php echo esc_html($ctaLabel); ?>
45 </a>
46 <?php endif; ?>
47 <?php if ($isSnoozable) : ?>
48 <button type="button" class="link" data-notice-action="snooze">
49 <?php esc_html_e('Remind me later', 'metricool'); ?>
50 </button>
51 <?php endif; ?>
52 </div>
53 </div>
54 </div>
55 </div>
56