forked from gambitph/Titan-Framework
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathclass-option-note.php
More file actions
41 lines (30 loc) · 844 Bytes
/
class-option-note.php
File metadata and controls
41 lines (30 loc) · 844 Bytes
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
if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly
class TitanFrameworkOptionNote extends TitanFrameworkOption {
public $defaultSecondarySettings = array(
'color' => 'green', // The color of the note's border
'notification' => false,
'paragraph' => true,
);
/*
* Display for options and meta
*/
public function display() {
$this->echoOptionHeader();
$color = $this->settings['color'] == 'green' ? '' : 'error';
if ( $this->settings['notification'] ) {
?><div class='updated below-h2 <?php echo $color ?>'><?php
}
if ( $this->settings['paragraph'] ) {
echo "<p class='description'>";
}
echo $this->settings['desc'];
if ( $this->settings['paragraph'] ) {
echo "</p>";
}
if ( $this->settings['notification'] ) {
?></div><?php
}
$this->echoOptionFooter( false );
}
}