Fix event list widget error

This commit is contained in:
Brian Miyaji
2014-03-28 16:33:09 +11:00
parent 4b93f57768
commit 461b4f394c

View File

@@ -1638,7 +1638,8 @@ if ( !function_exists( 'sp_get_calendar_data' ) ) {
),
);
if ( $pagenow != 'post-new.php' && $post_id ):
if ( $pagenow != 'post-new.php' ):
if ( $post_id ):
$leagues = get_the_terms( $post_id, 'sp_league' );
$seasons = get_the_terms( $post_id, 'sp_season' );
$venues = get_the_terms( $post_id, 'sp_venue' );
@@ -1690,10 +1691,15 @@ if ( !function_exists( 'sp_get_calendar_data' ) ) {
);
endif;
$events = get_posts( $args );
else:
$usecolumns = null;
$events = null;
endif;
$events = get_posts( $args );
else:
$usecolumns = null;
$events = array();
endif;
if ( $admin ):