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 add Loader without adding the addition code.

Yes, We are going to use WordPress Native Loader. There is almost 5-8 loader that is already in WordPress.

To use Loader gif just add their path in image source and boom your work is 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' ); ?>

Related posts:

Be First to Comment

Leave a Reply

Your email address will not be published. Required fields are marked *