Skip to content

Commit 052c9c0

Browse files
barthcclaygriffiths
authored andcommitted
gw-cache-buster.php: Fixed GP Multi-Page Navigation compatibility issue where custom starting pages are not applied.
1 parent 7d2ea71 commit 052c9c0

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

gravity-forms/gw-cache-buster.php

Lines changed: 9 additions & 1 deletion
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.1
12+
* Version: 0.6.2
1313
* Author URI: https://gravitywiz.com
1414
*/
1515
class GW_Cache_Buster {
@@ -301,6 +301,14 @@ public function ajax_get_form() {
301301
return rgar( $_REQUEST, 'form_theme' ) ?: $slug;
302302
}, 10, 2 );
303303

304+
add_filter( 'gpmpn_default_page_' . $form_id, function( $page ) {
305+
if ( rgars( $_REQUEST, 'atts/page' ) && rgget( 'gpmpn_page' ) ) {
306+
return rgget( 'gpmpn_page' );
307+
}
308+
309+
return rgars( $_REQUEST, 'atts/page', $page );
310+
} );
311+
304312
$atts = rgpost( 'atts' );
305313

306314
// GF expects an associative array for field values. Parse them before passing it on.

0 commit comments

Comments
 (0)