Field::errors()
Description #
Output label of field.
Source #
File: lib/form/class-field.php
public function errors() { $wrapper = $this->get( 'wrapper', array() ); if ( false !== $wrapper ) { $this->add_html( '<div class="ap-field-errorsc">' ); } if ( $this->have_errors() ) { $this->add_html( '<div class="ap-field-errors">' ); foreach ( $this->errors as $code => $err ) { $this->add_html( '<span class="ap-field-error ecode-' . esc_attr( $code ) . '">' . esc_html( $err ) . '</span>' ); } $this->add_html( '</div>' ); } if ( false !== $wrapper ) { $this->add_html( '</div>' ); } }
Expand full source code Collapse full source code View on GitHub: lib/form/class-field.php:411
Add your comment