Skip to content

Instantly share code, notes, and snippets.

@skyshab
Created August 3, 2018 17:22
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save skyshab/484c3c6bfeac4065ca7273737567284d to your computer and use it in GitHub Desktop.
Save skyshab/484c3c6bfeac4065ca7273737567284d to your computer and use it in GitHub Desktop.
custom loading icon
<?php
add_filter('tribe_events_before_html', 'my_tribe_events_before_html', 100);
function my_tribe_events_before_html($html) {
$events_label_plural = tribe_get_event_label_plural();
$before = stripslashes( tribe_get_option( 'tribeEventsBeforeHTML', '' ) );
$before = wptexturize( $before );
$before = convert_chars( $before );
$before = wpautop( $before );
$before = do_shortcode( stripslashes( shortcode_unautop( $before ) ) );
$before = '<div class="tribe-events-before-html">' . $before . '</div>';
$before = $before . '<span class="tribe-events-ajax-loading"><img class="tribe-events-spinner-medium" src="' . 'path/to/your-custom.gif' . '" alt="' . sprintf( esc_html__( 'Loading %s', 'the-events-calendar' ), $events_label_plural ) . '" /></span>';
return $before;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment