field['before'] ) ) { $class['has-addons'] = 'has-addons'; $class[] = 'has-addons-prepend'; } if ( ! empty( $this->field['after'] ) ) { $class['has-addons'] = 'has-addons'; $class[] = 'has-addons-append'; } $class = implode( ' ', $class ); // placeholder if( ! empty( $this->field['placeholder'] ) ){ $placeholder = $this->field['placeholder']; } if( ! empty( $this->field['std'] ) ){ $placeholder = $this->field['std']; } // preview if( ! empty( $this->field['preview'] ) ){ $preview = 'preview-'. $this->field['preview']; } // default unit if( isset($this->field['default_unit']) ){ $preview .= ' has-default-unit'; } // type if ( ! empty( $this->field['param'] ) ){ $type = $this->field['param']; } // output ----- echo '
'; if( ! empty( $this->field['before'] ) ){ echo '
'; echo ''. esc_attr( $this->field['before'] ) .''; echo '
'; } echo '
'; echo 'field['default_unit']) ? 'data-unit="'.$this->field['default_unit'].'"' : null ) .' class="mfn-field-value mfn-form-control mfn-form-input '. esc_attr( $preview ) .'" type="'. esc_attr( $type ) .'" '. $this->get_name( $meta ) .' value="'. esc_attr( $this->value ) .'" placeholder="'. esc_attr( $placeholder ) .'"/>'; echo '
'; if( ! empty( $this->field['after'] ) ){ echo '
'; echo ''. esc_attr( $this->field['after'] ) .''; echo '
'; } echo '
'; echo $this->get_description(); } }