Skip to content

Commit

Permalink
* Bug fix: Entries were not showing on [wt] chart if they had no weight.
Browse files Browse the repository at this point in the history
  • Loading branch information
alicolville committed Aug 27, 2024
1 parent 4e6d7a1 commit 9bb737a
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 6 deletions.
4 changes: 2 additions & 2 deletions includes/shortcode-wt.php
Original file line number Diff line number Diff line change
Expand Up @@ -145,8 +145,8 @@ function ws_ls_shortcode_wt( $user_defined_arguments ) {
$shortcode_arguments[ 'min-chart-points' ] = (int) $shortcode_arguments[ 'min-chart-points' ];
$shortcode_arguments[ 'selected-week-number' ] = ( true === $shortcode_arguments[ 'enable-week-ranges' ] ) ? ws_ls_post_value_numeric( 'week-number' ) : NULL;

// If any of the arguments are hiding to custom fields, then ensure all DB entries we fetch have a weight
$ensure_we_have_weights = ( false === ws_ls_to_bool( $shortcode_arguments[ 'hide-custom-fields-form' ] ) ||
// If any of the arguments are hiding custom fields, then ensure all DB entries we fetch have a weight
$ensure_we_have_weights = ( true === ws_ls_to_bool( $shortcode_arguments[ 'hide-custom-fields-form' ] ) ||
true === ws_ls_to_bool( $shortcode_arguments[ 'hide-custom-fields-chart' ] ) ||
true === ws_ls_to_bool( $shortcode_arguments[ 'hide-custom-fields-table' ] ) );

Expand Down
8 changes: 6 additions & 2 deletions readme.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@
Contributors: aliakro
Tags: weight,tracker,chart,history,macronutrient
Requires at least: 6.0
Tested up to: 6.5
Stable tag: 10.9
Tested up to: 6.61
Stable tag: 10.9.1
Requires PHP: 7.4
License: GPLv2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Expand Down Expand Up @@ -152,6 +152,10 @@ Measurements are created using Custom Fields. You can therefore specify the unit

== Changelog ==

= 10.9.1 =

* Bug fix: Entries were not showing on [wt] chart if they had no weight.

= 10.9 =

* New feature: Web Hooks: Data can now be fired to endpoints for new notes, see new setting "Send data for new notes".
Expand Down
4 changes: 2 additions & 2 deletions weight-loss-tracker.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
/**
* Plugin Name: Weight Tracker
* Description: Allow your users to track their weight, body measurements, photos and other pieces of custom data. Display in charts, tables, shortcodes and widgets. Manage their data, issue awards, email notifications, etc! Provide advanced data on Body Mass Index (BMI), Basal Metabolic Rate (BMR), Calorie intake, Harris Benedict Formula, Macronutrients Calculator and more.
* Version: 10.9
* Version: 10.9.1
* Requires at least: 6.0
* Tested up to: 6.5
* Requires PHP: 7.4
Expand All @@ -18,7 +18,7 @@
*/

define( 'WS_LS_ABSPATH', plugin_dir_path( __FILE__ ) );
define( 'WE_LS_CURRENT_VERSION', '10.9' );
define( 'WE_LS_CURRENT_VERSION', '10.9.1' );
define( 'WE_LS_TITLE', 'Weight Tracker' );
define( 'WE_LS_SLUG', 'weight-loss-tracker' );
define( 'WE_LS_LICENSE_TYPES_URL', 'https://docs.yeken.uk/features.html' );
Expand Down

0 comments on commit 9bb737a

Please sign in to comment.