WP_HTML_Processor::step_after_after_body(): bool

In this article

This function’s access is marked private. This means it is not intended for use by plugin or theme developers, only by core. It is listed here for completeness.

Parses next element in the ‘after after body’ insertion mode.

Description

This internal function performs the ‘after after body’ insertion mode logic for the generalized WP_HTML_Processor::step() function.

See also

Return

bool Whether an element was found.

Source

		$this->bail( 'Non-whitespace characters cannot be handled in after frameset' );
		break;

	/*
	 * > A comment token
	 */
	case '#comment':
	case '#funky-comment':
	case '#presumptuous-tag':
		$this->insert_html_element( $this->state->current_token );
		return true;

	/*
	 * > A DOCTYPE token
	 */
	case 'html':
		// Parse error: ignore the token.
		return $this->step();

	/*
	 * > A start tag whose tag name is "html"
	 */
	case '+HTML':
		return $this->step_in_body();

	/*
	 * > An end tag whose tag name is "html"
	 */
	case '-HTML':
		$this->state->insertion_mode = WP_HTML_Processor_State::INSERTION_MODE_AFTER_AFTER_FRAMESET;
		/*
		 * The HTML element is not removed from the stack of open elements.
		 * Only internal state has changed, this does not qualify as a "step"
		 * in terms of advancing through the document to another token.
		 * Nothing has been pushed or popped.
		 * Proceed to parse the next item.
		 */
		return $this->step();

	/*
	 * > A start tag whose tag name is "noframes"
	 */
	case '+NOFRAMES':
		return $this->step_in_head();
}

// Parse error: ignore the token.

Changelog

VersionDescription
6.7.0Introduced.

User Contributed Notes

You must log in before being able to contribute a note or feedback.