Skip to content

Docs: Clarify HTML API text extraction#73

Draft
sirreal wants to merge 1 commit into
trunkfrom
docs/html-api-text-extraction
Draft

Docs: Clarify HTML API text extraction#73
sirreal wants to merge 1 commit into
trunkfrom
docs/html-api-text-extraction

Conversation

@sirreal

@sirreal sirreal commented Jun 29, 2026

Copy link
Copy Markdown
Owner

Summary

  • Documents ordinary subtree text extraction as reading #text tokens by default.
  • Clarifies that special HTML elements carry their contents on the element token and should be opt-in for ordinary extraction.
  • States the decoded/raw and UTF-8 return contract for get_modifiable_text().

Verification

  • php -l src/wp-includes/html-api/class-wp-html-processor.php
  • php -l src/wp-includes/html-api/class-wp-html-tag-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