Skip to content

Instantly share code, notes, and snippets.

@rosshanney
Created November 28, 2012 19:47
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 rosshanney/4163629 to your computer and use it in GitHub Desktop.
Save rosshanney/4163629 to your computer and use it in GitHub Desktop.
Check if a feed has events
<?php
function gce_check_upcoming() {
$events = get_transient( 'gce_feed_1' );
if ( ! empty( $events ) ) {
// there are upcoming events
}
}
add_action( 'init', 'gce_check_upcoming' );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment