Skip to content

Commit

Permalink
chore: make sure that translation json file doesn't exist before atte…
Browse files Browse the repository at this point in the history
…mpting to load from `/themes`
  • Loading branch information
abaicus committed Jul 30, 2024
1 parent 8cba21e commit 31b6291
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions inc/core/front_end.php
Original file line number Diff line number Diff line change
Expand Up @@ -588,6 +588,10 @@ public function fix_script_translation_files( $file, $handle, $domain ) {
return $file;
}

if ( is_file( $file ) ) {
return $file;
}

if ( strpos( $file, WP_LANG_DIR . '/plugins' ) !== false ) {
$file = str_replace( WP_LANG_DIR . '/plugins', WP_LANG_DIR . '/themes', $file );
}
Expand Down

0 comments on commit 31b6291

Please sign in to comment.