forked from WordPress/wordpress-develop
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
HTML API: Report breadcrumbs properly when visiting virtual nodes.
When [58304] introduced the abililty to visit virtual nodes in the HTML document, those being the nodes which are implied by the HTML but no explicitly present in the raw text, a bug was introduced in the `get_breadcrumbs()` method because it wasn't updated to be aware of the virtual nodes. Therefore it would report the wrong breadcrumbs for virtual nodes. Since the new `get_depth()` method is based on the same logic it was also broken for virtual nodes. In this patch, the breadcrumbs have been updated to account for the virtual nodes and the depth method has been updated to rely on the fixed breadcrumb logic. Developed in WordPress#6914 Discussed in https://core.trac.wordpress.org/ticket/61348 Follow-up to [58304]. Props dmsnell, jonsurrell, zieladam. See #61348. git-svn-id: https://develop.svn.wordpress.org/trunk@58588 602fd350-edb4-49c9-b593-d223f7449a82
- Loading branch information
Showing
2 changed files
with
59 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters