Make WordPress Core

Changeset 57117

Timestamp:
11/17/2023 06:44:57 AM (9 months ago)
Author:
Bernhard Reiter
Message:

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.

Merges [57116] to the 6.4 branch.

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

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/6.4/src/wp-includes/html-api/class-wp-html-tag-processor.php

    r56953 r57117  
    117117 * Example:
    118118 *
    119  *     if ( $tags->next_tag( array( 'class' => 'wp-group-block' ) ) ) {
     119 *     if ( $tags->next_tag( array( 'class' => 'wp-group-block' ) ) ) {
    120120 *         $tags->set_attribute( 'title', 'This groups the contained content.' );
    121121 *         $tags->remove_attribute( 'data-test-id' );
Note: See TracChangeset for help on using the changeset viewer.