Make WordPress Core

Changeset 60409


Ignore:
Timestamp:
07/04/2025 07:58:58 PM (4 months ago)
Author:
SergeyBiryukov
Message:

Coding Standards: Remove unreachable continue from WP_Theme_JSON::get_block_nodes().

The outer loop uses a similar check for $include_node_paths_only to continue early a few lines above, preventing this one from ever being reached.

Follow-up to [59213].

Props justlevine.
See #63268.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-includes/class-wp-theme-json.php

    r60055 r60409  
    27822782                foreach ( $theme_json['styles']['blocks'][ $name ]['elements'] as $element => $node ) {
    27832783                    $node_path = array( 'styles', 'blocks', $name, 'elements', $element );
     2784
    27842785                    if ( $include_node_paths_only ) {
    27852786                        $nodes[] = array(
     
    27992800                            if ( isset( $theme_json['styles']['blocks'][ $name ]['elements'][ $element ][ $pseudo_selector ] ) ) {
    28002801                                $node_path = array( 'styles', 'blocks', $name, 'elements', $element );
    2801                                 if ( $include_node_paths_only ) {
    2802                                     $nodes[] = array(
    2803                                         'path' => $node_path,
    2804                                     );
    2805                                     continue;
    2806                                 }
    28072802
    28082803                                $nodes[] = array(
Note: See TracChangeset for help on using the changeset viewer.