Skip to content

Commit aa4e8ec

Browse files
committed
HTML API: Discourage public use of the step() method.
The preferred way to iterate with `WP_HTML_Processor` is via `::next_tag()` or `::next_token()`. Developed in WordPress#12269. Props jonsurrell, dmsnell. See #64896. git-svn-id: https://develop.svn.wordpress.org/trunk@62594 602fd350-edb4-49c9-b593-d223f7449a82
1 parent 4b5efee commit aa4e8ec

1 file changed

Lines changed: 5 additions & 0 deletions

File tree

src/wp-includes/html-api/class-wp-html-processor.php

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -999,8 +999,13 @@ public function expects_closer( ?WP_HTML_Token $node = null ): ?bool {
999999
/**
10001000
* Steps through the HTML document and stop at the next tag, if any.
10011001
*
1002+
* This is an internal method. The relevant public methods are
1003+
* {@see WP_HTML_Processor::next_tag()} and {@see WP_HTML_Processor::next_token()}.
1004+
*
10021005
* @since 6.4.0
10031006
*
1007+
* @access private
1008+
*
10041009
* @throws Exception When unable to allocate a bookmark for the next token in the input HTML document.
10051010
*
10061011
* @see self::PROCESS_NEXT_NODE

0 commit comments

Comments
 (0)