From f2df7d8b7c419f5cbfd5c729d70d07527b22cf29 Mon Sep 17 00:00:00 2001 From: Bernie Reiter Date: Fri, 17 Nov 2023 06:38:33 +0000 Subject: [PATCH] HTML API: Fix typo in documentation example. 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. Props dmsnell, gaambo, crstauf, atachibana, audrasjb, krupalpanchal. Fixes #59891. git-svn-id: https://develop.svn.wordpress.org/trunk@57116 602fd350-edb4-49c9-b593-d223f7449a82 --- src/wp-includes/html-api/class-wp-html-tag-processor.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/wp-includes/html-api/class-wp-html-tag-processor.php b/src/wp-includes/html-api/class-wp-html-tag-processor.php index 19cca778ea6ee..ea74410230954 100644 --- a/src/wp-includes/html-api/class-wp-html-tag-processor.php +++ b/src/wp-includes/html-api/class-wp-html-tag-processor.php @@ -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' ); * }