PluginProbe ʕ •ᴥ•ʔ
WP All Export – Drag & Drop Export to Any Custom CSV, XML & Excel / 1.3.1
WP All Export – Drag & Drop Export to Any Custom CSV, XML & Excel v1.3.1
trunk 0.9.0 0.9.1 1.0.0 1.0.1 1.0.2 1.0.3 1.0.4 1.0.5 1.0.6 1.0.7 1.0.8 1.0.9 1.1.0 1.1.1 1.1.2 1.1.3 1.1.4 1.1.5 1.2.0 1.2.1 1.2.10 1.2.2 1.2.3 1.2.4 1.2.5 1.2.6 1.2.7 1.2.8 1.2.9 1.3.0 1.3.1 1.3.2 1.3.3 1.3.4 1.3.5 1.3.6 1.3.7 1.3.8 1.3.9 1.4.0 1.4.1 1.4.10 1.4.11 1.4.12 1.4.13 1.4.14 1.4.15 1.4.2 1.4.3 1.4.4 1.4.5 1.4.6 1.4.7 1.4.8 1.4.9 1.5.0
wp-all-export / src / WordPress / AdminDismissibleNotice.php
wp-all-export / src / WordPress Last commit date
AdminDismissibleNotice.php 5 years ago AdminErrorNotice.php 5 years ago AdminNotice.php 5 years ago Filters.php 9 years ago SitewideAdminDismissibleNotice.php 4 years ago
AdminDismissibleNotice.php
44 lines
1 <?php
2
3 namespace Wpae\WordPress;
4
5
6 class AdminDismissibleNotice extends AdminNotice
7 {
8 private $noticeId;
9
10 public function __construct($message, $noticeId)
11 {
12 parent::__construct($message);
13 $this->noticeId = $noticeId;
14 }
15
16 public function showNotice()
17 {
18 ?>
19 <div class="<?php echo $this->getType();?>" style="position: relative;"><p>
20 <?php echo $this->message; ?>
21 </p>
22 <button class="notice-dismiss wpae-general-notice-dismiss" type="button" data-noticeId="<?php echo $this->noticeId; ?>"><span class="screen-reader-text">Dismiss this notice.</span></button>
23 </div>
24 <?php
25 }
26
27 public function render()
28 {
29 add_action('admin_notices', array($this, 'showNotice'));
30 }
31
32 public function getType()
33 {
34 return 'error';
35 }
36
37 public function isDismissed()
38 {
39 $optionName = 'wpae_dismiss_warnings_'.$this->noticeId;
40 $optionValue = get_option($optionName, false);
41
42 return $optionValue;
43 }
44 }