Skip to content

Commit

Permalink
Merge pull request #803 from Codeinwp/fix/offload-post-preview
Browse files Browse the repository at this point in the history
fix: preview images not working with offload enabled [closes #801]
  • Loading branch information
selul authored May 8, 2024
2 parents c5fa223 + a02a284 commit 52267f5
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion inc/manager.php
Original file line number Diff line number Diff line change
Expand Up @@ -266,7 +266,8 @@ public function should_replace() {
if ( ( is_admin() && ! self::is_ajax_request() ) || ! $this->settings->is_connected() || ! $this->settings->is_enabled() ) {
return false; // @codeCoverageIgnore
}
if ( array_key_exists( 'preview', $_GET ) && ! empty( $_GET['preview'] ) ) {

if ( array_key_exists( 'preview', $_GET ) && ! empty( $_GET['preview'] ) && ! $this->settings->is_offload_enabled() ) {
return false; // @codeCoverageIgnore
}

Expand Down

0 comments on commit 52267f5

Please sign in to comment.