Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 9 additions & 1 deletion gravity-forms/gw-cache-buster.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
* Plugin URI: https://gravitywiz.com/cache-busting-with-gravity-forms/
* Description: Bypass your website cache when loading a Gravity Forms form.
* Author: Gravity Wiz
* Version: 0.6.1
* Version: 0.6.2
* Author URI: https://gravitywiz.com
*/
class GW_Cache_Buster {
Expand Down Expand Up @@ -301,6 +301,14 @@ public function ajax_get_form() {
return rgar( $_REQUEST, 'form_theme' ) ?: $slug;
}, 10, 2 );

add_filter( 'gpmpn_default_page_' . $form_id, function( $page ) {
if ( rgars( $_REQUEST, 'atts/page' ) && rgget( 'gpmpn_page' ) ) {
return rgget( 'gpmpn_page' );
}

return rgars( $_REQUEST, 'atts/page', $page );
} );

$atts = rgpost( 'atts' );

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