Skip to content

Instantly share code, notes, and snippets.

@tankbar
Last active September 14, 2016 12:25
Show Gist options
  • Save tankbar/cfa07dcf596e099bed50db3d8d32e4ea to your computer and use it in GitHub Desktop.
Save tankbar/cfa07dcf596e099bed50db3d8d32e4ea to your computer and use it in GitHub Desktop.
Change the Default Gravity Forms AJAX Spinner - If you want to change the default Gravity Forms AJAX spinner, Gravity Forms provides us with a filter to do so: gform_ajax_spinner_url. Paste the following code into your installed and activated custom snippets plugin.
add_filter( 'gform_ajax_spinner_url', 'cwwp_custom_gforms_spinner' );
/**
* Changes the default Gravity Forms AJAX spinner.
*
* @since 1.0.0
*
* @param string $src The default spinner URL
* @return string $src The new spinner URL
*/
function cwwp_custom_gforms_spinner( $src ) {
return get_stylesheet_directory_uri() . '/images/loading.gif';
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment