Reflect statistic format in meta box

This commit is contained in:
Brian Miyaji
2017-04-18 00:20:06 +10:00
parent 1190535f74
commit 1496502977

View File

@@ -25,11 +25,13 @@ class SP_Meta_Box_Statistic_Details extends SP_Meta_Box_Config {
wp_nonce_field( 'sportspress_save_data', 'sportspress_meta_nonce' );
$precision = get_post_meta( $post->ID, 'sp_precision', true );
$section = get_post_meta( $post->ID, 'sp_section', true );
$format = get_post_meta( $post->ID, 'sp_format', true );
$visible = get_post_meta( $post->ID, 'sp_visible', true );
// Defaults
if ( '' === $precision ) $precision = 0;
if ( '' === $section ) $section = -1;
if ( '' === $format ) $format = 'number';
if ( '' === $visible ) $visible = 1;
?>
<p><strong><?php _e( 'Key', 'sportspress' ); ?></strong></p>