WordPress.org

Ready to get started?Download WordPress

Forums

Contact Form 7
Using custom ajax loading animated gif (5 posts)

  1. alexleonard
    Member
    Posted 3 years ago #

    Hi there,

    I can see that if I wanted to use a custom ajax loading animated gif for cf7 I'd just need to replace /path/to/wp-content/plugins/contact-form-7/images/ajax-loader.gif

    However that will mean that future plugin updates will overwrite my custom ajax-loader.gif. I've searched around to find if there's any way to instruct the plugin to use a custom location for this animated gif but can't find anything.

    For the time being I can just manually replace the gif in the plugin folder, but would be good to have an 'update proof' method.

    Cheers
    Alex

    http://wordpress.org/extend/plugins/contact-form-7/

  2. groomedmonkey
    Member
    Posted 3 years ago #

    I was about to post the same question as the default one doesn't look good on all backgrounds.

    Takayuki Miyoshi?

  3. Gecka
    Member
    Posted 3 years ago #

    /* Custom ajax loader */
    add_filter('wpcf7_ajax_loader', 'my_wpcf7_ajax_loader');
    function my_wpcf7_ajax_loader () {
    	return  get_bloginfo('stylesheet_directory') . '/images/ajax-loader.gif';
    }
  4. Dean Oakley
    Member
    Posted 2 years ago #

    Ah thankyou! It's a shame they don't just use a background image.

  5. Naoise Golden Santos
    Member
    Posted 2 years ago #

    Thank you! I also think it should be set by css rather than php.

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic