You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The examples in the documentation reference using the class parameter to query for an existing class on a tag. But the source code and code function documentation actually only suppor the class_name property:
The example under Modifying HTML attributes for a found tag should be: if ( $tags->next_tag( array( 'class_name' => 'wp-group-block' ) ) ) {
At least for me in WP 6.3.
Trac ticket: Core-59891
Resolves: WordPress/Documentation-Issue-Tracker#1362
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: @gaambo, @crstauf, @atachibana
Issue Description
Reported by @gaambo via User Contributed Notes.
URL of the Page with the Issue
https://developer.wordpress.org/reference/classes/wp_html_tag_processor/#modifying-html-attributes-for-a-found-tag
Section of Page with the issue
Usage > Modifying HTML attributes for a found tag
Why is this a problem?
Misrepresents how to use a method's class.
Suggested Fix
Change
class
toclass_name
.The text was updated successfully, but these errors were encountered: