From 90533c42e5342da76e20f092b4556fa7c2666ec3 Mon Sep 17 00:00:00 2001 From: Brian Miyaji Date: Wed, 11 Jan 2017 16:30:15 +1100 Subject: [PATCH] Add time format option to statistics --- .../class-sp-meta-box-statistic-details.php | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/includes/admin/post-types/meta-boxes/class-sp-meta-box-statistic-details.php b/includes/admin/post-types/meta-boxes/class-sp-meta-box-statistic-details.php index 72f8ffef..781299fd 100644 --- a/includes/admin/post-types/meta-boxes/class-sp-meta-box-statistic-details.php +++ b/includes/admin/post-types/meta-boxes/class-sp-meta-box-statistic-details.php @@ -52,6 +52,17 @@ class SP_Meta_Box_Statistic_Details extends SP_Meta_Box_Config { ?>

+

+

+ +

@@ -79,6 +90,7 @@ class SP_Meta_Box_Statistic_Details extends SP_Meta_Box_Config { public static function save( $post_id, $post ) { self::delete_duplicate( $_POST ); update_post_meta( $post_id, 'sp_section', (int) sp_array_value( $_POST, 'sp_section', -1 ) ); + update_post_meta( $post_id, 'sp_format', sp_array_value( $_POST, 'sp_format', 'number' ) ); update_post_meta( $post_id, 'sp_precision', (int) sp_array_value( $_POST, 'sp_precision', 1 ) ); update_post_meta( $post_id, 'sp_visible', sp_array_value( $_POST, 'sp_visible', 1 ) ); }