In the Timeline Express – Popups Add-On we’ve included a number of filters to customize the plugin to your needs. One such filter is wrapped around the preloader URL, so you can specify the preloader image you’d like to use.

Source:

<img class="preloader" src="<?php echo apply_filters( 'timeline_express_popup_preloader_src', admin_url( 'images/wpspin_light.gif' ) ); ?>" />

Users can make use of this filter by altering the URL to the preloader, which can be a URL to an image you’ve uploaded through the media library, or it can be an image hosted externally.

Code:

Here is an example that will alter the default preloader and use a custom preloader image:


/**
 * Filter timeline express popups preloader and specify a custom one.
 */
function alter_timeline_express_popups_preloader( $url ) {

   return 'https://digitalsynopsis.com/wp-content/uploads/2016/06/loading-animations-preloader-gifs-ui-ux-effects-18.gif';

}
add_filter( 'timeline_express_popup_preloader_src', 'alter_timeline_express_popups_preloader' );

The code snippet above can be added to your themes functions.php file. Once you’ve added it there, you can save it and check to confirm that the preloader has been updated.

Leave a Reply

Your email address will not be published.

This site uses Akismet to reduce spam. Learn how your comment data is processed.