Skip to content

Commit 1d6d31c

Browse files
authored
gw-cache-buster.php: Fixed an issue with Cache Buster causing conflict with GP Entry Blocks when editing entries.
1 parent dfbc5e7 commit 1d6d31c

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

gravity-forms/gw-cache-buster.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
* Plugin URI: https://gravitywiz.com/cache-busting-with-gravity-forms/
1010
* Description: Bypass your website cache when loading a Gravity Forms form.
1111
* Author: Gravity Wiz
12-
* Version: 0.6.5
12+
* Version: 0.6.6
1313
* Author URI: https://gravitywiz.com
1414
*/
1515
class GW_Cache_Buster {
@@ -104,8 +104,8 @@ public function shortcode( $markup, $attributes, $content ) {
104104
}
105105

106106
public function form_filter( $markup, $form ) {
107-
// Prevent recursion.
108-
if ( rgar( $GLOBALS, 'processing' ) ) {
107+
// Prevent recursion, and ensure we're not editing an entry via GP Entry Blocks.
108+
if ( rgar( $GLOBALS, 'processing' ) || ( function_exists( 'gp_entry_blocks' ) && gp_entry_blocks()->block_edit_form->is_editing_entry( $form['id'] ) ) ) {
109109
return $markup;
110110
}
111111

0 commit comments

Comments
 (0)