Skip to content

Commit 8f38b36

Browse files
westonruterCopilot
andauthored
Fall back to load_script_translations() when failing to parse src or content URL
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
1 parent bfe0eca commit 8f38b36

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

src/wp-includes/l10n.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1236,13 +1236,13 @@ function _load_script_textdomain_from_src( string $handle, string $src, string $
12361236

12371237
$src_url = wp_parse_url( $src );
12381238
if ( ! $src_url ) {
1239-
return false;
1239+
return load_script_translations( false, $handle, $domain );
12401240
}
12411241
$src_url['path'] ??= '';
12421242

12431243
$content_url = wp_parse_url( content_url() );
12441244
if ( ! $content_url ) {
1245-
return false;
1245+
return load_script_translations( false, $handle, $domain );
12461246
}
12471247

12481248
$plugins_url = wp_parse_url( plugins_url() );

0 commit comments

Comments
 (0)