Merge globals into single file, load options, and add text settings page

This commit is contained in:
Brian Miyaji
2014-03-18 16:39:53 +11:00
parent ee33f7b630
commit 37ebe39620
25 changed files with 748 additions and 497 deletions

View File

@@ -203,3 +203,18 @@ if ( !function_exists( 'sportspress_events_calendar' ) ) {
}
}
function sportspress_events_calendar_shortcode( $atts ) {
if ( isset( $atts['id'] ) ):
$id = $atts['id'];
unset( $atts['id'] );
elseif( isset( $atts[0] ) ):
$id = $atts[0];
unset( $atts[0] );
else:
$id = null;
endif;
$initial = isset( $atts['initial'] ) ? $atts['initial'] : true;
return sportspress_events_calendar( $id, $initial, $atts );
}
add_shortcode('events-calendar', 'sportspress_events_calendar_shortcode');