Organize config table

This commit is contained in:
Brian Miyaji
2014-01-06 12:21:05 +11:00
parent f49ec03546
commit 233d39eb8f
7 changed files with 42 additions and 18 deletions

View File

@@ -106,7 +106,12 @@ if ( !function_exists( 'sp_get_post_format' ) ) {
$format = get_post_meta ( $post_id, 'sp_format', true );
if ( $format ):
global $sportspress_config_formats;
return sp_array_value( $sportspress_config_formats, $format, '—' );
$format_str = sp_array_value( $sportspress_config_formats, $format, '—' );
if ( in_array( $format, array( 'decimal', 'time' ) ) ):
return $format_str . ' (' . sp_get_post_precision( $post_id ) . ')';
else:
return $format_str;
endif;
else:
return '—';
endif;