Created
August 3, 2018 17:22
-
-
Save skyshab/484c3c6bfeac4065ca7273737567284d to your computer and use it in GitHub Desktop.
custom loading icon
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?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