Better way of getting ID

This commit is contained in:
Brian Miyaji
2014-01-22 21:01:58 +11:00
parent 7555d78739
commit d7509b8614
12 changed files with 41 additions and 53 deletions

View File

@@ -2,10 +2,8 @@
if ( !function_exists( 'sportspress_player_metrics' ) ) {
function sportspress_player_metrics( $id = null ) {
if ( ! $id ):
global $post;
$id = $post->ID;
endif;
if ( ! $id )
$id = get_the_ID();
global $sportspress_countries;