PUM_Gravity_Forms_Integation::preload( $popup_id )
Description Description
Source Source
File: includes/integrations/class-pum-gravity-forms.php
public static function preload( $popup_id ) { if ( function_exists( 'gravity_form_enqueue_scripts' ) ) { $popup = pum_get_popup( $popup_id ); if ( has_shortcode( $popup->post_content, 'gravityform' ) ) { $regex = "/\[gravityform.*id=[\'\"]?([0-9]*)[\'\"]?.*/"; $popup = get_post( $popup_id ); preg_match_all( $regex, $popup->post_content, $matches ); foreach ( $matches[1] as $form_id ) { add_filter( "gform_confirmation_anchor_{$form_id}", '__return_false' ); gravity_form_enqueue_scripts( $form_id, true ); } } } }
Expand full source code Collapse full source code View on Trac