How to use WordPress Builtin Loader’s

Most of the time, we Googled to find the loader for our Ajax code. It takes some time to find and then implement all the code in our files. Today I’m going to share the simple trick through which we can add Loader without adding the additional code.

Yes, we are going to use the WordPress Native Loader. There are almost 5-8 loaders that are already in WordPress.

To use a Loader gif, simply add their path to the image source and you’re done.

@2x

 <?php echo admin_url( ‘images/spinner-2x.gif’ ) ?>  & <?php echo includes_url( ‘images/spinner-2x.gif’ ) ?>

<?php echo admin_url( ‘images/wpspin_light-2x.gif’ ); ?>

@1x

 <?php echo admin_url( ‘images/spinner.gif’ ); ?>  & <?php echo includes_url( ‘images/spinner.gif ‘); ?>

<?php echo admin_url( ‘images/wpspin_light.gif’ ); ?> 

<?php echo includes_url( ‘js/tinymce/skins/lightgray/img/loader.gif’ ); ?>

 <?php echo admin_url( ‘images/loading.gif’ ); ?>

<?php echo includes_url( ‘/js/mediaelement/loading.gif’ ); ?>

<?php echo includes_url( ‘js/thickbox/loadingAnimation.gif’ ); ?>

One Comment

  1. sharaz said:

    Great

    December 19, 2017
    Reply

Leave a Reply

Your email address will not be published.