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 );
				}
			}
		}
	}


Top ↑

User Contributed Notes User Contributed Notes

You must log in before being able to contribute a note or feedback.