| 1 |
<?php if ( ! defined( 'ABSPATH' ) ) { |
| 2 |
die; |
| 3 |
} // Cannot access directly. |
| 4 |
/** |
| 5 |
* |
| 6 |
* Field: notice |
| 7 |
* |
| 8 |
* @since 2.0 |
| 9 |
* @version 2.0 |
| 10 |
*/ |
| 11 |
if ( ! class_exists( 'SP_PC_Field_notice' ) ) { |
| 12 |
class SP_PC_Field_notice extends SP_PC_Fields { |
| 13 |
|
| 14 |
|
| 15 |
public function __construct( $field, $value = '', $unique = '', $where = '', $parent = '' ) { |
| 16 |
|
| 17 |
parent::__construct( $field, $value, $unique, $where, $parent ); |
| 18 |
} |
| 19 |
|
| 20 |
public function render() { |
| 21 |
echo $this->field_before(); |
| 22 |
$style = ( ! empty( $this->field['style'] ) ) ? $this->field['style'] : 'normal'; |
| 23 |
|
| 24 |
echo ( ! empty( $this->field['content'] ) ) ? '<div class="spf-notice spf-notice-' . $style . '">' . $this->field['content'] . '</div>' : ''; |
| 25 |
echo $this->field_after(); |
| 26 |
} |
| 27 |
|
| 28 |
} |
| 29 |
} |
| 30 |
|