'', 'desc' => '', 'indent' => false, 'notice' => true, 'style' => '', 'color' => '', ); $this->field = wp_parse_args( $this->field, $defaults ); } /** * Field Render Function. * Takes the vars and outputs the HTML for the field in the settings * * @since 1.0.0 * @access public * @return void */ public function render() { $styles = array( 'normal', 'info', 'warning', 'success', 'critical', 'custom', ); if ( ! in_array( $this->field['style'], $styles, true ) ) { $this->field['style'] = 'normal'; } if ( 'custom' === $this->field['style'] ) { if ( ! empty( $this->field['color'] ) ) { $this->field['color'] = 'border-color:' . $this->field['color'] . ';'; } else { $this->field['style'] = 'normal'; $this->field['color'] = ''; } } else { $this->field['color'] = ''; } if ( empty( $this->field['desc'] ) && ! empty( $this->field['default'] ) ) { $this->field['desc'] = $this->field['default']; unset( $this->field['default'] ); } if ( empty( $this->field['desc'] ) && ! empty( $this->field['subtitle'] ) ) { $this->field['desc'] = $this->field['subtitle']; unset( $this->field['subtitle'] ); } if ( empty( $this->field['desc'] ) ) { $this->field['desc'] = ''; } if ( empty( $this->field['raw_html'] ) ) { if ( true === $this->field['notice'] ) { $this->field['class'] .= ' redux-notice-field'; } else { $this->field['class'] .= ' redux-info-field'; } $this->field['style'] = 'redux-' . $this->field['style'] . ' '; } // Old shim, deprecated arg. if ( isset( $this->field['sectionIndent'] ) ) { $this->field['indent'] = $this->field['sectionIndent']; } $indent = ( isset( $this->field['indent'] ) && $this->field['indent'] ) ? ' form-table-section-indented' : ''; echo ''; echo '
' . wp_kses_post( $this->field['title'] ) . wp_kses_post( $this->field['desc'] ) . '
'; } } echo '