Skip to content

Commit

Permalink
fix: improve checking for editing context when the replacement should…
Browse files Browse the repository at this point in the history
… be off
  • Loading branch information
selul committed Aug 20, 2019
1 parent 86ab6d2 commit e7510f6
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions inc/manager.php
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@ public function should_replace() {
if ( ( is_admin() && ! self::is_ajax_request() ) || ! $this->settings->is_connected() || ! $this->settings->is_enabled() || is_customize_preview() ) {
return false; // @codeCoverageIgnore
}
if ( array_key_exists( 'preview', $_GET ) && 'true' == $_GET['preview'] ) {
if ( array_key_exists( 'preview', $_GET ) && ! empty( $_GET['preview'] ) ) {
return false; // @codeCoverageIgnore
}

Expand All @@ -138,10 +138,10 @@ public function should_replace() {
if ( array_key_exists( 'elementor-preview', $_GET ) && ! empty( $_GET['elementor-preview'] ) ) {
return false; // @codeCoverageIgnore
}
if ( array_key_exists( 'ct_builder', $_GET ) && $_GET['ct_builder'] == 'true' ) {
if ( array_key_exists( 'ct_builder', $_GET ) && ! empty( $_GET['ct_builder'] ) ) {
return false; // @codeCoverageIgnore
}
if ( array_key_exists( 'et_fb', $_GET ) && ( $_GET['et_fb'] == 'true' || $_GET['et_fb'] == '1' ) ) {
if ( array_key_exists( 'et_fb', $_GET ) && ! empty( $_GET['et_fb'] ) ) {
return false; // @codeCoverageIgnore
}
if ( array_key_exists( 'context', $_GET ) && $_GET['context'] == 'edit' ) {
Expand Down

0 comments on commit e7510f6

Please sign in to comment.