WP_HTML_Processor::generate_implied_end_tags( string|null $except_for_this_element = null )

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.

Closes elements that have implied end tags.

Description

See also

Parameters

$except_for_this_elementstring|nulloptional
Perform as if this element doesn’t exist in the stack of open elements.

Default:null

Source

 * HTML Parsing Algorithms
 */

/**
 * Closes a P element.
 *
 * @since 6.4.0
 * @ignore
 *
 * @throws WP_HTML_Unsupported_Exception When encountering unsupported HTML input.
 *
 * @see https://html.spec.whatwg.org/#close-a-p-element
 */
private function close_a_p_element(): void {
	$this->generate_implied_end_tags( 'P' );
	$this->state->stack_of_open_elements->pop_until( 'P' );
}

/**
 * Closes elements that have implied end tags.
 *
 * @since 6.4.0
 * @since 6.7.0 Full spec support.

Changelog

VersionDescription
6.7.0Full spec support.
6.4.0Introduced.

User Contributed Notes

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