Fix bugs, use plural post slugs, move actions and filters into hooks folder

This commit is contained in:
Brian Miyaji
2014-01-09 02:37:13 +11:00
parent e76d392726
commit bfcf6e9b38
32 changed files with 390 additions and 312 deletions

View File

@@ -0,0 +1,24 @@
<?php
function sportspress_the_content( $content ) {
if ( is_singular( 'sp_team' ) && in_the_loop() ):
elseif ( is_singular( 'sp_table' ) && in_the_loop() ):
global $post;
// Display league table
$content .= sportspress_league_table( $post->ID );
elseif ( is_singular( 'sp_list' ) && in_the_loop() ):
global $post;
// Display player list
$content .= sportspress_player_list( $post->ID );
endif;
return $content;
}
add_filter( 'the_content', 'sportspress_the_content' );
add_filter( 'get_the_content', 'sportspress_the_content' );