Skip to content

Commit 2b8d641

Browse files
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. Built from https://develop.svn.wordpress.org/trunk@60409 git-svn-id: https://core.svn.wordpress.org/trunk@59745 1a063a9b-81f0-0310-95a4-ce76da25c4cd
1 parent a0d3db3 commit 2b8d641

File tree

2 files changed

+2
-7
lines changed

2 files changed

+2
-7
lines changed

wp-includes/class-wp-theme-json.php

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2781,6 +2781,7 @@ private static function get_block_nodes( $theme_json, $selectors = array(), $opt
27812781
if ( isset( $theme_json['styles']['blocks'][ $name ]['elements'] ) ) {
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(
27862787
'path' => $node_path,
@@ -2798,12 +2799,6 @@ private static function get_block_nodes( $theme_json, $selectors = array(), $opt
27982799
foreach ( static::VALID_ELEMENT_PSEUDO_SELECTORS[ $element ] as $pseudo_selector ) {
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(
28092804
'path' => $node_path,

wp-includes/version.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
*
1717
* @global string $wp_version
1818
*/
19-
$wp_version = '6.9-alpha-60408';
19+
$wp_version = '6.9-alpha-60409';
2020

2121
/**
2222
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.

0 commit comments

Comments
 (0)