notice.php 700 B

1234567891011121314151617181920212223242526
  1. <?php if ( ! defined( 'ABSPATH' ) ) { die; } // Cannot access directly.
  2. /**
  3. *
  4. * Field: notice
  5. *
  6. * @since 1.0.0
  7. * @version 1.0.0
  8. *
  9. */
  10. if ( ! class_exists( 'CSF_Field_notice' ) ) {
  11. class CSF_Field_notice extends CSF_Fields {
  12. public function __construct( $field, $value = '', $unique = '', $where = '', $parent = '' ) {
  13. parent::__construct( $field, $value, $unique, $where, $parent );
  14. }
  15. public function render() {
  16. $style = ( ! empty( $this->field['style'] ) ) ? $this->field['style'] : 'normal';
  17. echo ( ! empty( $this->field['content'] ) ) ? '<div class="csf-notice csf-notice-'. esc_attr( $style ) .'">'. $this->field['content'] .'</div>' : '';
  18. }
  19. }
  20. }