Computes the HTML breadcrumbs for the currently-matched node, if matched.
Description
Breadcrumbs start at the outermost parent and descend toward the matched element.They always include the entire path from the root HTML node to the matched element. Example: $processor = WP_HTML_Processor::create_fragment( '<p><strong><em><img></em></strong></p>' );
$processor->next_tag( 'IMG' );
$processor->get_breadcrumbs() === array( 'HTML', 'BODY', 'P', 'STRONG', 'EM', 'IMG' );
Return
string[]
Array of tag names representing path to matched node.
Signature, return type and hooks compared across 5 parsed releases.
6.8.8
Return type changed from string[]|null to string[].verified against source
6.4.0
Introduced.from the docblock
About this page
Parsed data
Generated from the wordpress-develop 6.8.8 tag, from src/wp-includes/html-api/class-wp-html-processor.php, and regenerated for each WordPress release so it tracks the code rather than a snapshot of it.
Corrections
Something wrong on this page? Report it and it gets fixed in the next regeneration.