Skip to content

Commit 14544fa

Browse files
committed
Fix for subdirectories and wordpress uploaded images
1 parent f28af30 commit 14544fa

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

includes/lib/transifex-live-integration-rewrite.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -180,7 +180,9 @@ function reverse_hard_link( $lang, $link, $languages_map, $source_lang, $pattern
180180
$parsed_url = parse_url($link);
181181
$link_host = isset($parsed_url['host']) ? $parsed_url['host'] : '';
182182
// change only wordpress non-admin links - not links reffering to other domains
183-
if ( $link_host === $site_host && strpos($link, '/wp-admin') === false ) {
183+
if ( $link_host === $site_host && strpos($link, '/wp-admin') === false
184+
&& strpos($link, '/wp-content/uploads') === false
185+
) {
184186
/* Check if the path starts with the language code,
185187
* otherwise prepend it. */
186188
$parsed = parse_url( $link );

0 commit comments

Comments
 (0)