Skip to content

Commit ef95060

Browse files
committed
fix to elementor - rewrite file URL only if mode requires that
1 parent d7f0dce commit ef95060

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

lib/classes/compatibility/elementor.php

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,10 @@ public function sync_rewrite_url($url, $scheme, $orig_scheme) {
5050
$absolutePath = $wp_uploads_dir['basedir'] . '/' . $name;
5151
$name = apply_filters('wp_stateless_file_name', $name, 0);
5252
do_action('sm:sync::syncFile', $name, $absolutePath);
53-
$url = ud_get_stateless_media()->get_gs_host() . '/' . $name;
53+
54+
if (!in_array(ud_get_stateless_media()->get('sm.mode'), ['disabled', 'backup'])) {
55+
$url = ud_get_stateless_media()->get_gs_host() . '/' . $name;
56+
}
5457
}
5558
}
5659
} catch (\Exception $e) {

0 commit comments

Comments
 (0)