Add more front end glory
This commit is contained in:
@@ -5,44 +5,59 @@ function sportspress_the_content( $content ) {
|
||||
|
||||
global $post;
|
||||
|
||||
// Display event details
|
||||
$content = sportspress_event_details( $post->ID ) . $content;
|
||||
$details = sportspress_event_details( $post->ID );
|
||||
$results = sportspress_event_results( $post->ID );
|
||||
$players = sportspress_event_players( $post->ID );
|
||||
$staff = sportspress_event_staff( $post->ID );
|
||||
|
||||
if ( ! empty( $results ) ):
|
||||
$content = $results . $details . $players . $staff . $content;
|
||||
else:
|
||||
$venue = sportspress_event_venue( $post->ID );
|
||||
$content = $details . $venue . $players . $staff . $content;
|
||||
endif;
|
||||
|
||||
elseif ( is_singular( 'sp_calendar' ) && in_the_loop() ):
|
||||
|
||||
global $post;
|
||||
|
||||
// Display events calendar
|
||||
$content = sportspress_events_calendar( $post->ID ) . $content;
|
||||
$calendar = sportspress_events_calendar( $post->ID );
|
||||
|
||||
$content = $calendar . $content;
|
||||
|
||||
elseif ( is_singular( 'sp_team' ) && in_the_loop() ):
|
||||
|
||||
global $post;
|
||||
|
||||
// Display team columns
|
||||
$content = sportspress_team_columns( $post->ID ) . $content;
|
||||
$columns = sportspress_team_columns( $post->ID );
|
||||
|
||||
$content = $columns . $content;
|
||||
|
||||
elseif ( is_singular( 'sp_table' ) && in_the_loop() ):
|
||||
|
||||
global $post;
|
||||
|
||||
// Display league table
|
||||
$content = sportspress_league_table( $post->ID ) . $content;
|
||||
sportspress_league_table( $post->ID );
|
||||
|
||||
$content = $table . $content;
|
||||
|
||||
elseif ( is_singular( 'sp_list' ) && in_the_loop() ):
|
||||
|
||||
global $post;
|
||||
|
||||
// Display player list
|
||||
$content = sportspress_player_list( $post->ID ) . $content;
|
||||
$list = sportspress_player_list( $post->ID );
|
||||
|
||||
$content = $list . $content;
|
||||
|
||||
|
||||
elseif ( is_singular( 'sp_player' ) && in_the_loop() ):
|
||||
|
||||
global $post;
|
||||
|
||||
// Display player metrics and statistics
|
||||
$content = sportspress_player_metrics( $post->ID ) . sportspress_player_statistics( $post->ID ) . $content;
|
||||
$metrics = sportspress_player_metrics( $post->ID );
|
||||
$statistics = sportspress_player_statistics( $post->ID );
|
||||
|
||||
$content = $metrics . $statistics . $content;
|
||||
|
||||
endif;
|
||||
|
||||
|
||||
@@ -6,6 +6,7 @@ function sportspress_enqueue_scripts() {
|
||||
|
||||
// Scripts
|
||||
wp_enqueue_script( 'jquery' );
|
||||
wp_enqueue_script( 'google-maps', 'https://maps.googleapis.com/maps/api/js?v=3.exp&sensor=false', array(), '3.exp', true );
|
||||
wp_enqueue_script( 'jquery-datatables', SPORTSPRESS_PLUGIN_URL .'/assets/js/jquery.dataTables.min.js', array( 'jquery' ), '1.9.4', true );
|
||||
wp_enqueue_script( 'sportspress', SPORTSPRESS_PLUGIN_URL .'/assets/js/sportspress.js', array( 'jquery' ), time(), true );
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user