Field::output()

Description #

Create field markup.

Source #

File: lib/form/class-field.php

	public function output() {
		$this->html = '';
		$this->html_order();

		foreach ( (array) $this->output_order as $method ) {
			if ( method_exists( $this, $method ) ) {
				$this->add_html( $this->$method() );
			}
		}

		/**
		 * Filter applied before returning a html of a field.
		 *
		 * @param string $html Field HTML markup.
		 * @param object $field Current field object.
		 */
		$this->html = apply_filters( 'ap_field_html', $this->html, $this ); // xss okay.

		if ( ! empty( $this->html ) ) {
			return $this->html; // xss okay.
		}
	}

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