PluginProbe ʕ •ᴥ•ʔ
WP All Export – Drag & Drop Export to Any Custom CSV, XML & Excel / trunk
WP All Export – Drag & Drop Export to Any Custom CSV, XML & Excel vtrunk
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 1 month ago AdminErrorNotice.php 6 years ago AdminNotice.php 1 month ago Filters.php 9 years ago OrderQuery.php 1 month ago SitewideAdminDismissibleNotice.php 1 month ago
AdminDismissibleNotice.php
49 lines
1 <?php
2
3
4 namespace Wpae\WordPress;
5
6 defined( 'ABSPATH' ) || exit;
7
8
9
10 class AdminDismissibleNotice extends AdminNotice
11 {
12 private $noticeId;
13
14 public function __construct($message, $noticeId)
15 {
16 parent::__construct($message);
17 $this->noticeId = $noticeId;
18 }
19
20 public function showNotice()
21 {
22 ?>
23 <div class="<?php echo esc_attr($this->getType());?>" style="position: relative;">
24 <p>
25 <?php echo wp_kses_post($this->message); ?>
26 </p>
27 <button class="notice-dismiss wpae-general-notice-dismiss" type="button" data-noticeId="<?php echo esc_attr($this->noticeId); ?>"><span class="screen-reader-text">Dismiss this notice.</span></button>
28 </div>
29 <?php
30 }
31
32 public function render()
33 {
34 add_action('admin_notices', array($this, 'showNotice'));
35 }
36
37 public function getType()
38 {
39 return 'error';
40 }
41
42 public function isDismissed()
43 {
44 $optionName = 'wpae_dismiss_warnings_'.$this->noticeId;
45 $optionValue = get_option($optionName, false);
46
47 return $optionValue;
48 }
49 }