Skip to content

Commit

Permalink
Update ThemeVariationsController.php
Browse files Browse the repository at this point in the history
Fix Change the path where it should look for the theme-i18.json file for different translations.
  • Loading branch information
crodriguezbrito committed Dec 5, 2024
1 parent b5c3e52 commit fc48811
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions includes/RestApi/Themes/ThemeVariationsController.php
Original file line number Diff line number Diff line change
Expand Up @@ -135,8 +135,8 @@ public function get_update_diy_global_style_variation_args() {
* @return string
*/
private static function translate( $theme_json, $domain = 'default' ) {
$i18n_schema = wp_json_file_decode( __DIR__ . '/theme-i18n.json' );

$path = wp_normalize_path( realpath( ABSPATH . WPINC ) ) . '/theme-i18n.json';
$i18n_schema = wp_json_file_decode( $path );
return translate_settings_using_i18n_schema( $i18n_schema, $theme_json, $domain );
}

Expand Down

0 comments on commit fc48811

Please sign in to comment.