From 1569eb0b9f8264229fb0642bb21db3b59408a5e9 Mon Sep 17 00:00:00 2001 From: Ali YeKen Date: Tue, 21 Mar 2017 20:03:02 +0000 Subject: [PATCH] Removed Decimal setting --- includes/functions.php | 5 ----- includes/globals.php | 7 ------- pages/page.settings.php | 12 ------------ readme.txt | 6 +++++- weight-loss-tracker.php | 4 ++-- 5 files changed, 7 insertions(+), 27 deletions(-) diff --git a/includes/functions.php b/includes/functions.php index ad3f2294..20f3185f 100644 --- a/includes/functions.php +++ b/includes/functions.php @@ -58,11 +58,6 @@ function ws_ls_weight_object($user_id, $kg, $pounds, $stones, $pounds_only, $not } } - // If not allowing decimals, then round figures down - if(!WS_LS_USE_DECIMALS){ - $weight = ws_ls_round_weights($weight); - } - // Generate display switch (ws_ls_get_config('WE_LS_DATA_UNITS')) { case 'pounds_only': diff --git a/includes/globals.php b/includes/globals.php index e57cad35..92114469 100644 --- a/includes/globals.php +++ b/includes/globals.php @@ -65,7 +65,6 @@ 'WE_LS_WEIGHT_LINE_COLOUR' => '#aeaeae', 'WE_LS_WEIGHT_FILL_COLOUR' => '#f9f9f9', 'WE_LS_US_DATE' => false, - 'WS_LS_USE_DECIMALS' => false, 'WE_LS_CHART_TYPE' => 'line', //line, bar 'WS_LS_ADVANCED_TABLES' => true, 'WE_LS_CHART_MAX_POINTS' => 25, @@ -142,12 +141,6 @@ $globals['WE_LS_US_DATE'] = true; } // ----------------------------------------------------------------------------------- - // Allow decimals? - // ----------------------------------------------------------------------------------- - if ('yes' == get_option('ws-ls-allow-decimals')){ - $globals['WS_LS_USE_DECIMALS'] = true; - } - // ----------------------------------------------------------------------------------- // Plot points // ----------------------------------------------------------------------------------- if (WS_LS_IS_PRO && get_option('ws-ls-max-points')){ diff --git a/pages/page.settings.php b/pages/page.settings.php index 549faeab..8d38f4c7 100644 --- a/pages/page.settings.php +++ b/pages/page.settings.php @@ -159,17 +159,6 @@ function ws_ls_settings_page() {

- - - - -

- - @@ -510,7 +499,6 @@ function ws_ls_register_settings() // Pro only open if(WS_LS_IS_PRO){ register_setting( 'we-ls-options-group', 'ws-ls-allow-user-preferences' ); - register_setting( 'we-ls-options-group', 'ws-ls-allow-decimals' ); register_setting( 'we-ls-options-group', 'ws-ls-chart-type' ); register_setting( 'we-ls-options-group', 'ws-ls-allow-advanced-tables' ); register_setting( 'we-ls-options-group', 'ws-ls-max-points' ); diff --git a/readme.txt b/readme.txt index 42f30752..fbac0c50 100644 --- a/readme.txt +++ b/readme.txt @@ -3,7 +3,7 @@ Contributors: aliakro Tags: weight, loss, lose, helper, bmi, body, mass, index, graph, track, stones, kg, table, data, plot, target, history, pounds, responsive, chart, measurements, cm, centimeters, inches, hip, waist, bicep, thigh Requires at least: 4.1.0 Tested up to: 4.7.2 -Stable tag: 4.2.4 +Stable tag: 4.2.5 License: GPLv2 or later License URI: http://www.gnu.org/licenses/gpl-2.0.html @@ -158,6 +158,10 @@ Lots of new features. Three new Pro shortcodes, email notifications and more. == Changelog == += 4.2.5 = + +* Decimal places are now a core feature and no longer just a perk of Pro. + = 4.2.4 = * Added simpler shortcodes (don't worry the old ones still work): diff --git a/weight-loss-tracker.php b/weight-loss-tracker.php index e80e5efb..044fe9e1 100644 --- a/weight-loss-tracker.php +++ b/weight-loss-tracker.php @@ -5,7 +5,7 @@ /** * Plugin Name: Weight Loss Tracker * Description: Allow registered users of your website to track their weight and relevant body measurements. History can be displayed in both tables & charts. - * Version: 4.2.4 + * Version: 4.2.5 * Author: YeKen * Author URI: https://www.YeKen.uk @@ -29,7 +29,7 @@ */ define('WS_LS_ABSPATH', plugin_dir_path( __FILE__ )); -define('WE_LS_CURRENT_VERSION', '4.2.4'); +define('WE_LS_CURRENT_VERSION', '4.2.5'); // ----------------------------------------------------------------------------------------- // AC: Activate / Deactivate / Uninstall Hooks