Input::html_order()

Description #

Order of HTML markup.

Source #

File: lib/form/class-input.php

	protected function html_order() {
		if ( 'hidden' === $this->subtype ) {
			$this->output_order = array( 'wrapper_start', 'errors', 'field_markup', 'wrapper_end' );
		} else {
			parent::html_order();
		}

		// Remove label output if custom HTML.
		if ( $this->get( 'html' ) && empty( $this->args['label'] ) ) {
			$this->output_order = array_diff( $this->output_order, array( 'label', 'field_wrap_start', 'field_wrap_end' ) );
		}
	}

Leave a Reply

Your email address will not be published.

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Add your comment