Skip to content

Commit 5cc4cb8

Browse files
authored
Merge pull request #644 from newfold-labs/fix/PRESS10-52
Fix Change the path where it should look for the theme-i18.json file for different translations
2 parents b901f54 + 6ffe714 commit 5cc4cb8

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)