gform_ajax_spinner_url

gform_ajax_spinner_url

DescriptionUsageParametersExamplesChange the spinner image to a custom image file.PlacementSource Code

Description
This filter can be used to change the default AJAX spinner image
Usage
1add_filter( 'gform_ajax_spinner_url', 'custom_spinner_image', 10, 2 );
You can also specify this per form by adding the form id after the hook name.
1add_filter( 'gform_ajax_spinner_url_6', 'custom_spinner_image', 10, 2 );

Parameters

$image_src string
The spinner image URL to be filtered

$form Form Object
Current form.

Examples
Change the spinner image to a custom image file.
1234add_filter( 'gform_ajax_spinner_url', 'spinner_url', 10, 2 );function spinner_url( $image_src, $form ) {    return "http://www.somedomain.com/spinner.png";}
Placement
This code should be placed in the functions.php file of your active theme.
Source Code
This filter is located in GFFormDisplay::get_form() in form_display.php

发表回复

您的电子邮箱地址不会被公开。 必填项已用 * 标注