Skip to content

Commit

Permalink
Fix for subdirectories and wordpress uploaded images
Browse files Browse the repository at this point in the history
  • Loading branch information
foteinigk committed Oct 24, 2024
1 parent f28af30 commit 14544fa
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion includes/lib/transifex-live-integration-rewrite.php
Original file line number Diff line number Diff line change
Expand Up @@ -180,7 +180,9 @@ function reverse_hard_link( $lang, $link, $languages_map, $source_lang, $pattern
$parsed_url = parse_url($link);
$link_host = isset($parsed_url['host']) ? $parsed_url['host'] : '';
// change only wordpress non-admin links - not links reffering to other domains
if ( $link_host === $site_host && strpos($link, '/wp-admin') === false ) {
if ( $link_host === $site_host && strpos($link, '/wp-admin') === false
&& strpos($link, '/wp-content/uploads') === false
) {
/* Check if the path starts with the language code,
* otherwise prepend it. */
$parsed = parse_url( $link );
Expand Down

0 comments on commit 14544fa

Please sign in to comment.