Skip to content

Commit 6ffe714

Browse files
Fix Change the path where it should look for the theme-i18.json file for different translations.
1 parent b901f54 commit 6ffe714

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

includes/RestApi/Themes/ThemeVariationsController.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -135,8 +135,8 @@ public function get_update_diy_global_style_variation_args() {
135135
* @return string
136136
*/
137137
private static function translate( $theme_json, $domain = 'default' ) {
138-
$i18n_schema = wp_json_file_decode( __DIR__ . '/theme-i18n.json' );
139-
138+
$path = wp_normalize_path( realpath( ABSPATH . WPINC ) ) . '/theme-i18n.json';
139+
$i18n_schema = wp_json_file_decode( $path );
140140
return translate_settings_using_i18n_schema( $i18n_schema, $theme_json, $domain );
141141
}
142142

0 commit comments

Comments
 (0)