| Server IP : 145.239.37.162 / Your IP : 216.73.216.55 Web Server : Apache System : Linux webm003.cluster130.gra.hosting.ovh.net 6.18.42-ovh-vps-grsec-zfs+ #1 SMP PREEMPT_DYNAMIC Wed Aug 5 15:59:48 CEST 2026 x86_64 User : verseaa ( 38250) PHP Version : 7.4.33 Disable Function : _dyuweyrj4,_dyuweyrj4r,dl MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : ON | Sudo : OFF | Pkexec : OFF Directory : /home/verseaa/www/wp-content/plugins/gravityforms/includes/save-form/ |
Upload File : |
<?php
/**
* Class GF_Save_Form_Helper
*
* Provides some helper functions to the form saving functionality.
*
* @since 2.6
*
* @package Gravity_Forms\Gravity_Forms\Save_Form
*/
namespace Gravity_Forms\Gravity_Forms\Save_Form;
use Gravity_Forms\Gravity_Forms\GF_Service_Container;
class GF_Save_Form_Helper {
/**
* Stores an instance of GFForms to call common static functions.
*
* @since 2.6
*
* @var \GFForms
*/
protected $gf_forms;
/**
* GF_Save_Form_Helper constructor.
*
* @since 2.6
*
* @param array $dependencies Array of dependency objects.
*/
public function __construct( $dependencies ) {
$this->gf_forms = $dependencies['gf_forms'];
}
/**
* Checks if the AJAX action being executed is one of the endpoints of saving the form.
*
* @since 2.6
*
* @return bool
*/
public function is_ajax_save_action() {
$action = rgpost( 'action' );
$gf_forms = $this->gf_forms;
$endpoint = $gf_forms::get_service_container()->get( $action );
return $endpoint && is_a( $endpoint, 'Gravity_Forms\Gravity_Forms\Save_Form\Endpoints\GF_Save_Form_Endpoint_Admin' );
}
/**
* Checks if the ajax save is disabled using the provided filter
*
* @param integer $form_id If provided the filter will be used for this specific form.
*
* @since 2.6
*
* @return mixed
*/
public function is_ajax_save_disabled( $form_id = null ) {
$is_ajax_save_disabled = false;
/**
* This filter should be used to disabled ajax save.
*
* @since 2.6
*
* @param boolean $is_ajax_save_disabled Defaults to false.
*/
return gf_apply_filters( array( 'gform_disable_ajax_save', $form_id ), $is_ajax_save_disabled );
}
}