Skip to content

Commit

Permalink
I18n: Fix broken loop in WP_Theme_JSON_Resolver (#33624)
Browse files Browse the repository at this point in the history
  • Loading branch information
gziolo authored and sarayourfriend committed Jul 23, 2021
1 parent f8d400f commit 7160d5c
Showing 1 changed file with 5 additions and 6 deletions.
11 changes: 5 additions & 6 deletions lib/class-wp-theme-json-resolver-gutenberg.php
Original file line number Diff line number Diff line change
Expand Up @@ -127,14 +127,13 @@ private static function extract_paths_to_translate( $i18n_partial, $current_path
foreach ( $i18n_partial as $property => $partial_child ) {
if ( is_numeric( $property ) ) {
foreach ( $partial_child as $key => $context ) {
return array(
array(
'path' => $current_path,
'key' => $key,
'context' => $context,
),
$result[] = array(
'path' => $current_path,
'key' => $key,
'context' => $context,
);
}
return $result;
}
$result = array_merge(
$result,
Expand Down

0 comments on commit 7160d5c

Please sign in to comment.