Skip to content

Commit

Permalink
HTML API: Fix typo in documentation example.
Browse files Browse the repository at this point in the history
The example code in the PHPDoc comment for the HTML Tag Processor class
previously showed calling `next_tag()` with an array containing a `class`
key, which should have been `class_name`. This patch fixes this by using
the appropriate `class_name` key.

Merges [57116] to the 6.4 branch.

Props dmsnell, gaambo, crstauf, atachibana, audrasjb, krupalpanchal.
Fixes #59891.

git-svn-id: https://develop.svn.wordpress.org/branches/6.4@57117 602fd350-edb4-49c9-b593-d223f7449a82
  • Loading branch information
ockham committed Nov 17, 2023
1 parent 3aa1af6 commit 4ac4256
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/wp-includes/html-api/class-wp-html-tag-processor.php
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@
*
* Example:
*
* if ( $tags->next_tag( array( 'class' => 'wp-group-block' ) ) ) {
* if ( $tags->next_tag( array( 'class_name' => 'wp-group-block' ) ) ) {
* $tags->set_attribute( 'title', 'This groups the contained content.' );
* $tags->remove_attribute( 'data-test-id' );
* }
Expand Down

0 comments on commit 4ac4256

Please sign in to comment.