mirror of
https://github.com/WenPai-org/wp-china-yes.git
synced 2025-08-08 06:56:08 +08:00
feat: v3.7.0
This commit is contained in:
parent
dd912a9e31
commit
2391c18bae
76 changed files with 9491 additions and 353 deletions
26
framework/fields/notice/notice.php
Normal file
26
framework/fields/notice/notice.php
Normal file
|
@ -0,0 +1,26 @@
|
|||
<?php if ( ! defined( 'ABSPATH' ) ) { die; } // Cannot access directly.
|
||||
/**
|
||||
*
|
||||
* Field: notice
|
||||
*
|
||||
* @since 1.0.0
|
||||
* @version 1.0.0
|
||||
*
|
||||
*/
|
||||
if ( ! class_exists( 'WP_CHINA_YES_Field_notice' ) ) {
|
||||
class WP_CHINA_YES_Field_notice extends WP_CHINA_YES_Fields {
|
||||
|
||||
public function __construct( $field, $value = '', $unique = '', $where = '', $parent = '' ) {
|
||||
parent::__construct( $field, $value, $unique, $where, $parent );
|
||||
}
|
||||
|
||||
public function render() {
|
||||
|
||||
$style = ( ! empty( $this->field['style'] ) ) ? $this->field['style'] : 'normal';
|
||||
|
||||
echo ( ! empty( $this->field['content'] ) ) ? '<div class="wp_china_yes-notice wp_china_yes-notice-'. esc_attr( $style ) .'">'. $this->field['content'] .'</div>' : '';
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue