Skip to content

Docs: Clarify HTML Processor subtree traversal#77

Draft
sirreal wants to merge 1 commit into
trunkfrom
docs/html-api-subtree-traversal
Draft

Docs: Clarify HTML Processor subtree traversal#77
sirreal wants to merge 1 commit into
trunkfrom
docs/html-api-subtree-traversal

Conversation

@sirreal

@sirreal sirreal commented Jun 29, 2026

Copy link
Copy Markdown
Owner

Summary

  • Clarifies that WP_HTML_Processor::next_token() is the tree-aware token walk API.
  • Documents implied structure, virtual/implied closers, and the depth-bounded subtree pattern.
  • Expands get_current_depth() docs with closer-depth semantics and the >= subtree guard.

Verification

  • php -l src/wp-includes/html-api/class-wp-html-processor.php
  • git diff --check

Trac ticket: TBD

Use of AI Tools

AI assistance: Yes
Tool(s): Codex
Used for: Reviewing the generated documentation-improvement branch, splitting evidence-backed changes into focused PRs, drafting wording, and running local verification. Final changes were reviewed against source behavior and experiment notes.

@sirreal sirreal added this to the HTML API docs milestone Jun 29, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant