diff --git a/.distignore b/.distignore index c7a2bbe3..90581348 100644 --- a/.distignore +++ b/.distignore @@ -4,4 +4,5 @@ .distignore /docs /playwright -release.json \ No newline at end of file +release.json +todo.txt \ No newline at end of file diff --git a/README.md b/README.md index c6362acd..97cde681 100755 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ # Weight Tracker -[Weight Tracker](https://wordpress.org/plugins/weight-loss-tracker/) is a [WordPress](https://wordpress.org) plugin that allows your users to track their weight, measurements, photos and custom data! Support for BMI, BMR, Calorie Intake, Macronutrients and much more! +[Weight Tracker](https://weighttracker.yeken.uk/) is a [WordPress](https://wordpress.org) plugin that allows your users to track their weight, measurements, photos and custom data! Support for BMI, BMR, Calorie Intake, Macronutrients and much more! The plugin can be found on the WordPress plugin directory: https://wordpress.org/plugins/weight-loss-tracker/ diff --git a/readme.txt b/readme.txt index 83ba301e..5b1bbaff 100644 --- a/readme.txt +++ b/readme.txt @@ -3,7 +3,7 @@ Contributors: aliakro Tags: weight,tracker,chart,history,macronutrient Requires at least: 6.0 Tested up to: 6.5 -Stable tag: 10.11 +Stable tag: 10.11.1 Requires PHP: 7.4 License: GPLv2 or later License URI: http://www.gnu.org/licenses/gpl-2.0.html @@ -170,6 +170,10 @@ Measurements are created using Custom Fields. You can therefore specify the unit == Changelog == += 10.11.1 = + +* Maintenance: Minor tweaks to text files. + = 10.11 = * New feature: Added an auto updater. Since leaving WordPress, we needed our own way to auto update the plugin. @@ -494,3 +498,1436 @@ New feature: Added new shortcode [wt-bmi-calculator]. Read more: https://docs.ye * Bug fix: Issue with -0lbs being displayed instead of 0lbs. * Bug fix: Time of message not displayed correctly. * Bug fix: Messages to a user are removed when "Delete all data" pressed. + + += 9.4.1 = + +* Bug fix: When user's email address was included in email notifications the data would not laod correctly. + += 9.4 = + +* New feature: Added additional arguments to [wt-user-settings] so various elements of the settings form can be hidden. Read more: https://docs.yeken.uk/shortcodes/wt-user-settings.html +* New feature: Added the field "previous-weight" to [wt-if]. +* Improvement: Added the ability to edit group names. +* Bug fix: Generate cache key correctly when loading groups. +* Changed "Heavily Overweight" in "BMI" calculations to match NHS terminology (https://www.nhs.uk/common-health-questions/lifestyle/what-is-the-body-mass-index-bmi/) + += 9.3.13 = + +* Improvement: Added the argument "auto-detect" to [wt-group-total-weight-loss] shortcode. +* Improvement: Added the argument "text-no-difference" to [wt-group-total-weight-loss] shortcode. +* Bug fix: Small issue fixed where images weren't being processed in forms if set to "Do not show in shortcodes". + += 9.3.12 = + +* Added new hook when simple user settings are saved. + += 9.3.11 = + +* Added new hook when user settings are saved. + += 9.3.10 = + +* Improvement: Remove DB constant so DB tables and cron jobs are recreated on every plugin update (if needed) + += 9.3.9 = + +* Bug fix: 2nd attempt at fixing issues where Challenge data wasn't being processed correctly every hour. +* Bug fix: Updated challenges documentation links. + += 9.3.8 = + +* Bug fix: Fixed issue where Challenge data wasn't being processed correctly every hour. + += 9.3.7 = + +* Improvement: Macronutrient break down (into fats, carbs and proteins) can now be different per aim (maintain, lose or gain). + += 9.3.6 = + +* Improvement: Added new argument to [wt-calories] that allows you to specify a percentage of the calculated figure to display e.g. [wt-calories percentage=60] +* Improvement: Added new field, "challenges-opted-in", to [wt-if]. This allows you to do conditional logic around whether a user has opted in or not to challenges. + += 9.3.5 = + +* Improvement: PHP8 Compatibility. Thanks @shakethatweight-simon https://github.com/alicolville/Weight-Tracker/issues/403 + += 9.3.4 = + +* Bug fix: Change to database structure to ensure Large Text fields can be stored properly. +* Bug fix: Only process photo fields when actually placed within form. + += 9.3.3 = + +* Bug fix: Tweaks to ensure WT works correctly with newer versions of Gravity Forms. + += 9.3.2 = + +* Bug fix: Error when loading labels/values for drop downs. + += 9.3.1 = + +* Improvement: Added the argument to 'custom-field-restrict-rows' to [wt-table] and [wt-custom-field-table]. This allows you to control if an entry is shown or not by which custom fields have been populated. +* Improvement: Added the argument to 'custom-field-restrict-rows' to [wt-chart] and [wt-custom-field-chart]. This allows you to control if an entry is shown or not by which custom fields have been populated. +* Improvement: Added the argument "invert" to the shortcode [wt-difference-from-target]. +* Bug fix: When an image is not specified for a custom photo field, still store a row in the meta field entry table. +* Bug fix: Escape single quotes when emailing notes to users. +* Bug fix: When editing an entry via [wt-custom-fields-table], don't display the weight entry part of the form. +* Bug fix: When editing an entry via [wt-custom-fields-table], only display the custom fields for the fields displayed within the table. + += 9.3 = + +* New feature: Admin notes. AStore notes against your users and optionally share with them. +* New feature: New shortcode [wt-notes] for display admin notes to your users. Read more: https://docs.yeken.uk/shortcodes/wt-calculator.html + += 9.2.1 = + +* Bug fix: Error being thrown due to PHP type casting while calculating Macros. + += 9.2 = + +* New feature: New shortcode [wt-calculator]. Allow logged in and non-logged in users to calculate their BMI, BMR, suggested calorie intake and macronutrients by varying the input parameters. https://docs.yeken.uk/shortcodes/wt-calculator.html +* Improvement: New argument "always-show" for [wt-shortcode-optin]. If set to true, the buttons shall always be displayed regardless of user choice. https://docs.yeken.uk/shortcodes/wt-challenges-optin.html +* Improvement: Added the filter "wlt-form-custom-field-row". Specifying this will allow you to inject HTML before each custom field on a form. +* Change: Changed the underlying code that powers BMR, Calorie and Macro N calculations to not be exclusively tied to user accounts. This is to support upcoming features. +* Bug fix: Minor CSS fix based on https://github.com/alicolville/Weight-Tracker/issues/386. Thanks @shakethatweight-simon +* Bug fix: Removed extra slashes from custom field dropdown and select options. https://github.com/alicolville/Weight-Tracker/issues/385 + += 9.1.1 = + +* Improvement: Added date pickers on "From" and "To" for custom date range on export page. +* Bug fix: Ensured the argument "custom-field-groups" is being respected correctly when using [wt-custom-fields-chart]. +* Bug fix: Issue when building SQL statement for report options + += 9.1 = + +* New feature: New custom field type "Dropdown" - create sliders to allow your user to answer using a scale. +* New feature: New custom field type "Range Slider" - create sliders to allow your user to answer using a scale. +* New feature: New custom field type "Large Text" - allow your user's to enter larger blocks of text. +* New feature: New custom field type "Radio buttons" - allow your user's to chose an answer from a defined list. +* Bug fix: Remove back slashes in custom field titles. +* Bug fix: Additional column headers are now correctly added to CSV output. +* Bug fix: Remove weight related columns from export rows where no weight entry was added. +* Bug fix: Bug fix with caching in [wt-photo-oldest] and [wt-photo-recent]. +* Change: Removed trailing colon (:) from meta field labels. + += 9.0.4 = + +* Bug fix: Fixed an issue where weight entry hooks were not being fired correctly (so awards etc not being issues as expected). + += 9.0.3 = + +* Tweak to notice about expiring legacy licenses. + += 9.0.2 = + +* Bug fix: Hide notice about expiring license once a new license has been entered. + += 9.0.1 = + +* Tweak to notice about expiring legacy licenses. + += 9.0 = + +* New feature: Allow entries without needing a weight - e.g. Custom Field only entries. +* New feature: New shortcode: [wt-custom-fields-accumulator] - displays a series of buttons that allow the user to increment the value of a numeric custom field. Read more https://docs.yeken.uk/shortcodes/wt-custom-fields-accumulator.html +* New feature: New shortcode: [wt-custom-fields-table] - display custom fields entries in a table. Read more https://docs.yeken.uk/shortcodes/wt-custom-fields-table.html +* New feature: New shortcode: [wt-custom-fields-chart] - display custom fields only on a chart. Read more https://docs.yeken.uk/shortcodes/wt-custom-fields-chart.html +* New feature: New shortcode: [wt-custom-fields-form] - display custom fields only on a form. Read more https://docs.yeken.uk/shortcodes/wt-custom-fields-form.html +* New feature: [wt-chart] shortcode can be used to display custom fields only (i.e. hide weight entries/targets). Use the new shortcode arguments 'show-weight' and 'show-target'. Read more https://docs.yeken.uk/shortcodes/wt-chart.html +* New feature: [wt-chart] new argument "message-no-data" to specify the error message to display when there is no data to display on the chart. Read more https://docs.yeken.uk/shortcodes/wt-chart.html +* New feature: Specify safety caps to ensure calories to lose weight doesn't fall below a certain value. +* New setting: "Load previous entry upon date selection?" - If enabled, and data exists, then the user will be asked whether they wish to load the data for the selected date chosen on the entry form. +* Improvement: When updating an entry, only fields that exist in the form shall be updated on the entry. This will save parts of an entry being blanked in certian circumstancs. +* Improvement: New arguments for shortcode [wt-table] 'enable-bmi', 'enable-notes'and 'enable-weight'. Read more https://docs.yeken.uk/shortcodes/wt-table.html +* Improvement: Upgrading charting library (chart.js) and underlying code to 3.2.0. +* Improvement: Added support for curved (bezier) lines for custom fields when plotted on charts. +* Improvement: Added the arguments "force-todays-date", "weight-mandatory", "load-placeholders" and "title" to the [wt-form] shortcode. Read more https://docs.yeken.uk/shortcodes/wt-form.html +* Improvement: Added the argument "weight-mandatory" to the [wt] shortcode. +* Improvement: Added the argument "type" to the shortcode [wt-form]. Specifies type of form. Either weight entry (weight), Set target (target), custom fields or both weight and custom fields. Read more https://docs.yeken.uk/shortcodes/wt-form.html +* Improvement: Placeholder values in weight/custom-field/target forms will now have suffixes. +* Improvement: Added BMI numeric value in admin data tables. +* Improvement: Added additional error handling around the ID argument for the [wt-challenges] shortcode. +* Improvement: Added a small notice to [wt-user-settings] informing admin that "Allow user settings" must be enabled for the shortcode to work. +* Improvement: Improved the warning around license expiring in x days. +* Bug fix: Fixed an issue where the argument "custom-field-groups" on forms wasn't being respected properly. +* Bug fix: Ensured [wt-chart] respected the argument "message-no-data". +* Bug fix: Fixed an issue where exports would not run for Pro users. +* Bug fix: Fixed "wlt-awards-deleting" hook from incorrectly firing. +* Bug fix: Fixed issue with "Delete Data" button not working in admin. +* Bug fix: Removed name and id attributes from "Clear Target" as causing non-unique console errors. +* Bug fix: Removed name and id attributes from "Save Entry" as causing non-unique console errors. +* Change: Removed redundant setting "Should y Axes start at 0?" as chart.js 3 treats y axes differently. +* Change: Removed redundant setting "Display points on chart?" this is now controlled by "Point thickness". +* Change: Added warning message around older licenses being deprecated. + += 8.5.1 = + +* Improvement: Added Weight Tracker filters to myCred log page. + += 8.5 = + +* New Feature: Support for myCred. Reward your users for adding weight entries and setting their target. Read more: https://docs.yeken.uk/gamification.html +* Renamed [wt-gallery] to [wt-photo-gallery]. Please note, the old shortcode will still work. + += 8.4 = + +* New Feature: New shortcode [wt-latest-date] - display the date of the latest weight entry. Read more: https://docs.yeken.uk/shortcodes-text.html +* New Feature: New shortcode [wt-previous-date] - display the date of the previous weight entry. Read more: https://docs.yeken.uk/shortcodes-text.html +* New Feature: New shortcode [wt-start-date] - display the date of the first weight entry. Read more: https://docs.yeken.uk/shortcodes-text.html +* New Feature: New Shortcode [wt-days-between-start-and-latest] - display the number of days between first and latest entry. Read more: https://docs.yeken.uk/shortcodes-text.html +* New Feature: If enabled (Setting: Display previous entry on form?), the user's previous entry will be displayed as placeholders on form fields. This will allow the user to see the values on the previous entry. +* New Feature: Custom Field Groups. Custom fields can now be added to groups. +* Improvement: The following shortcodes can now be filtered so only certain custom fields or custom field groups are rendered: [weight-tracker], [wt-form], [wt-chart] and [wt-table]. +* Improvement: Display and change the order of boxes on user summary and profile page (admin). +* Improvement: [weight-tracker] - new argument "hide-chart-overview" to hide chart on the Overview tab. +* Improvement: [weight-tracker] - new argument "show-chart-history" to show a chart on the History tab. +* Improvement: Added a new button to "Show all entries" on the User summary page. Please bare in mind, this option maybe slow performing on large data sets. +* Improvement: Admin: User profile: Added "Start" and "Latest" dates. Also the number of days between them is also displayed. +* Improvement: New revamped documentation site https://docs.yeken.uk. All references to https://weight.yeken.uk have been changed to the new site. + += 8.3.2 = + +* Updated "Tested upto" statement within readme.txt + += 8.3.1 = + +* Updated "Tested upto" statement within readme.txt + += 8.3 = + +* Improvement: Webhooks, Zapier & Slack. Push weight entry data and targets to Slack channels, Zapier or your own custom Webhooks. + += 8.2 = + +* Improvement: Added an Email Template manager so outgoing email templates can be edited without needing to dive into the database. +* Improvement: Removed redundant "Measurements" tab. + += 8.1.12 = + +* Bug fix: Challenge datepicker can now pick years in the future. +* Bug fix: Removed "Read more about challenges" link under hide tab descriptions. + += 8.1.11 = + +* Improvement: Added helper CSS classes to
to support different licenses. +* Bug fix: Don't attempt to set/get user cache on a group basis when cache has been disabled. + += 8.1.10 = + +* Tested with 5.6 and updated tested upto statement. + += 8.1.9 = + +* Bug fix: Persist querystring values when a weight or target form is submitted. +* Bug fix: Persist querystring values when a user deletes their data. + += 8.1.8 = + +* Improvement: Added 50% off voucher for Prp Plus upgrade. +* Bug fix: Added shortened shortcodes for wlt-if-1, etc e.g. wlt-if-1 > wt-if-1 +* Bug fix: Challenges not shown when "Close" icon was pressed. +* Updated plugin tags. + += 8.1.7 = + +* Improvement: Made it clearer that challenges are a Pro Plus feature. +* Improvement: Added shortened challenges shortcodes. + += 8.1.6 = + +* Improvement: Added a new shortcode [wt-form-target] which renders a target form ( wraps around [wt-form] ). +* Bug fix: Corrected additional information under "Include User's email address" setting. + += 8.1.5 = + +* Improvement: New setting to disable adding user's email to notification settings. +* Improvement: Entire cache is invalidated when settings are saved. +* Bug fix: Corrected rendering of user email address in notification email (i.e. not part of Weight Summary). +* Bug fix: Fixed issue when rendering [wt-gallery] where an error would be displayed saying an array element was missing. + += 8.1.4 = + +* Improvement: Custom field names / questions have been increased from 40 characters to 200 to allow for bigger questions. +* Improvement: New setting: Specify whether to use a custom field's name / question or abbreviation for chart legends. +* Improvement: Added user's email address to email notifications. +* Bug fix: When a meta field was removed from the graph dataset due to no data, a missing index caused the graph to fail. This has now been corrected. + += 8.1.3 = + +* Bug fix: Fixed issue with translation paths. +* Improvement: Updated plugin headers + += 8.1.2 = + +* Bug fix: Changes to ensure [wlt-awards] would render badges correctly. +* Bug fix: Only fire Ajax call to process export when on the export page. +* Bug fix: Updated Czech PO file. + += 8.1.1 = + +* Improvement: Added new settings for tabs. Theme, hide descriptions and when to switch to a dropdown. +* Bug fix: Re-build language files. +* Bug fix: Delete user cache upon a Gravity Form submission. +* Bug fix: Changed word "drunk" to "drank". + += 8.1 = + +* Improvement: New export interface that supports large data sets. Data is now prepped and saved to disk in stages which improves performance. +* Improvement: Ability to download all exports. +* Improvement: Added new setting to enable and disable challenges functionality. +* Improvement: Added new setting for email notifications "Include Weight Summary". If enabled, additional data will be included regarding the user's weight entries. +* Change: By default, tab descriptions shall now be hidden unless enabled in Settings. +* Bug fix: [wt-progress-bar] - when a user meets or exceeds their target, set the progress to 100%, not 1%! +* Bug fix: Labels for form fields are correctly linked by ID. +* Bug fix: Corrected caching issue when fetching entries. Not just caching on ID but all arguments for the lookup. +* Bug fix: Fixed Danish PO file + += 8.0.6 = + +* Bug fix: Updated URL to demo site. + += 8.0.5 = + +* Bug fix: Corrected an issue where localisation wasn't always kicking in. + += 8.0.4 = + +* Bug fix: Adjustments to Gravity Hooks processor to process meta fields correctly. + += 8.0.3 = + +* Bug fix: Reverse weight entry data correct for [wt-chart] shortcode. + += 8.0.2 = + +* Improvement: Added the argument 'bmi-format' (accepts 'label', 'both' or 'index') to shortcodes wt-table and wt. Allows you to control the format BMI is displayed in. + += 8.0.1 = + +* Tweak: 'hide-meta' argument renamed to 'hide-custom-fields' on [wt-form] shortcode. +* Tweak: Replaced 'enable-meta-fields' argument with 'enable-custom-fields' for [wt-table] shortcode. +* Tweak: Renamed argument 'show-meta-fields' with 'show-custom-fields' on [wt-chart]. +* Improvement: Added 'wt-total-weight-loss-by-community' alias for 'wt-total-lost'. +* Improvement: Standardised shortcode names, created new versions with 'wt-' prefix instead of 'wlt-' + += 8.0 = + +* New Feature: Allow numeric custom fields to be plotted on charts. +* New Feature: A user's target weight can now be displayed on bar graphs. +* Improvement: Measurements have been removed. They have now been migrated (along with user data) into Custom Fields. +* Improvement: Measurements, now custom fields, can now be displayed on bar graphs. +* Improvement: Export to CSV / JSON performance has been drastically improved. +* Improvement: 1000s of lines of code optimised and re-factored. +* Improvement: Various performance tweaks. All globals no longer dynamically loaded. +* Improvement: Caching: Previously, user cache consisted of a large data object per user. This would be loaded on every cache lookup. Now, instead, the cache object has been replaced with a lookup table of cache keys relating to the user. If a sub key is found, the larger, relevant data object is fetched from catch. +* Improvement: Caching: More database lookups are now cached. +* Improvement: Caching: Cache time has been increased from 15 minutes to 24 hours. +* Improvement: Caching: Shortcodes now have additional caching. +* Improvement: JS libraries are included for charts when needed. +* Improvement: Target weight added to user search results. +* Improvement: Removed redundant usage statistics being sent to YeKen. +* Improvement: Weights are no longer inserted into the database in three formats. Instead, only Kg is stored and converted when required. +* Improvement: Removed redundant tools for correcting conversion issues (added 5+ years ago). +* Improvement: Old shortcode names have now been deprecated and should be replaced with current names. +* Improvement: Optimised SQL queries. +* Improvement: Global variables declared on each page load for feature lists have been removed. +* Improvement: [wt-new-users] shortcode is now cached for 15 minutes. +* Improvement: New setting: Notes can be disabled on user weight forms (via settings). +* Improvement: Form Widget: Ability to show / hide the notes field. +* Improvement: [wt-form] and [wt] - new argument "hide-notes" to hide notes field. +* Improvement: Expanded error messages where required to be more descriptive. +* Improvement: Improved some error handling messages. +* Improvement: Targets can now be cleared by submitting the form with no weight specified. +* Improvement: User entry tables: MySQL queries and data processing are now cached. +* Improvement: User entry tables: Option to exclude meta field data when viewing all user entries (big speed improvement) +* Improvement: User entry tables: Usernames now open the user's record in a new tab. +* Improvement: Emails notifications: Now using underlying email manager that was added in 6.1. +* Improvement: Emails notifications: Subjects are more informative. +* Improvement: User groups are now enabled by default and appear on the main menu. +* Improvement: WLT Shortcode: Week Ranges are now displayed when over 150 weeks. They can also have to be enabled with new argument "enable-week-ranges" +* Improvement: Admin JS has been minified. +* Improvement: All CSS files are now minified. +* Improvement: Added buttons for quickly adding new custom fields. +* Improvement: Challenges are now enabled by default. +* Bug fix: "Who can view and modify user data?" has been fixed so user's with the specified minimum role can now access admin data pages. +* Bug fix: Awards for a user are now deleted when "Delete all data for this user" has been clicked. +* Bug fix: All challenge data for a user is now deleted when "Delete all data for this user" has been clicked. +* Bug fix: Cache now invalidated correctly when updating meta fields. +* Bug fix: Grid lines can now be toggled off for charts. +* Bug fix: All text when on Widget settings is now translatable. +* Bug fix: User search results were showing in correct weights. +* Bug fix: Removed dead setting "Disable notifications from YeKen?". +* Bug fix: Meta fields cache no longer cleared on weight entry insert / save. +* Bug fix: Only display "Clear Target" if the user has a target currently set. +* Bug fix: Delete all cache if admin delete's all data. +* Bug fix: BMR now cached on a user by user basis correctly. +* Bug fix: User data tables, difference in weight field now displays correct difference. +* Bug fix: Stats database table is also cleared when all user data has been deleted. +* Bug fix: When all user data has been removed, cache is now cleared. +* Bug fix: Week selector works correctly on [wlt] shortcode when showing advanced data table. +* Bug fix: When exporting to CSV / JSON, HTML is removed from image custom fields. Instead the full URL is returned. +* Bug fix: [wt-group-weight-difference] now shows the weight in the correct user format. +* Bug fix: User stats table is now cached for up to an hour. +* Bug fix: When placing more than one form on a page, unique IDs are generated for photo fields. This fixes an issue where the first field would be populated with a user selected a photo rather than the correct field. +* Bug fix: "ID" now displayed when displaying custom fields table in admin area. + += 7.6.3 = + +* Improvement: Added user ID to Harris Benedict filters. + += 7.6.2 = + +* Bug fix: Error thrown on settings page as Pro Plus not active. + += 7.6.1 = + +* Improvement: Removed redundant PHP files. +* Improvement: Removed redundant meta field database columns. +* Improvement: Various minor PHP tweaks throughout code. +* Bug fix: Fix to ensure we are checking for correct MySQL tables. + += 7.6 = + +* Improvement: Ability to specify ranges when subtracting / adding calories to lose / gain weight. +* Improvement: Ability to specify a % of calories to add / subtract for weight gain / loss (instead of just a fixed value) +* Improvement: Added new Spanish translations (thanks @Iván) +* Improvement: Additional filters throughout plugin. +* Improvement: Additional underlying support for shortcodes to support user IDs other than current logged in user. +* Improvement: New setting to determine whether commas should be used when formatting larger numbers. +* Improvement: New Challenge filter "Min. Weight Entries". This will default to "Two or more" i.e. ignore all entries that have only entered one weight entered. +* Bug fix: When a user had one or less entry then an exception was thrown while calculating no of entries in challenges. +* Bug fix: Gravity Form fix to ensure photos added via custom fields can be added to the weight entry. +* Bug fix: Error thrown when a start weight of zero is entered. +* Bug fix: Graph dates are now localised. +* Bug fix: Challenges tweak, show total weight loss as a comparison value. +* Bug fix: Main shortcode [wlt] would load upto a maximum of 1000 data entries when rendering the shortcode. This was hugely inefficient and the data was not required. Instead, it has been change to load enough data required for the chart (on average just 25 weight entries!) +* Bug fix: Missing image on license page. +* Tweaked descriptions on [wlt] tabs + += 7.5.7 = + +* Improvement: Pass individual Macro shortcode through same rounding. +* Improvement: Added user_id to wlt-filter-bmr-calculation filter. +* Bug fix: Invalidate cache for a user when updating a single setting field + += 7.5.6 = + +* Improvement: Added filter for Macro rounding places. + += 7.5.5 = + +* Change: Added additional support for custom fields in user preferences. +* Change: Removed redundant github link. + += 7.5.4 = + +* Bug fix: Challenges - Only include Challenge files (beta) for Pro Plus licenses. Doing so without a valid license caused settings not to save. +* Change: Challenges - by default, Challenges are disabled. + += 7.5.3 = + +* Bug fix: Undeclared variable in measurements throwing an exception. + += 7.5.2 = + +* Improvement: Challenges - calculate averages based on user's that have more than one Weight Entry recorded. +* Bug Fix: Challenges - issue fixed where rendering sums and averages out in stones / lbs was stripped down to a number. + += 7.5.1 = + +* Improvement: Challenges - added sums and averages table. + += 7.5 = + +* Improvement: Added a 5 minute cron hook. +* Improvement: Changed display to render a user's First and Last name and then fall back to nickname +* Improvement: Added Challenges. +* Improvement: Record when a weight entry was actually inserted. Currently not exposed, but maybe of use with the new Challenges system. +* Improvement: Hook fired when user cache has been deleted "wlt-hook-delete-cache-for-user". +* Improvement: Refactored and improved speed of user search. +* Improvement: When mobile, make the user header menu responsive. +* Improvement: Added some cross reference to YeKen's Meal Tracker. +* Improvement: Various small refactors of code. +* Bug fix: Fixed rounding of [wlt-weight-diff] & [wlt-weight-diff-from-target] to two decimal places +* Bug fix: Fixed layout issue on help page. +* Bug fix: Changed "Show Wizard" link so it doesn't trigger Meal Tracker's to also show. +* Bug fix: Added missing BMI to JSON export. +* Bug fix: Added Group to export. + += 7.4 = + +* New Feature: New settings to split calorie intake over meal times. + += 7.3 = + +* Improvement: Added a filter ( 'wt_ls_user_profile_header_links' ) to allow a user header record to be manipulated by other plugins. +* Improvement: Hook into Meal Tracker to add a view "Weight Tracker Record" to user profile. +* Improvement: refactored function wlt_user_action_links(). +* Improvement: Refactored dialog function. +* Improvement: Some general tweaks and refactoring. +* Improvement: Refactored function yk_mt_link_email_for_user(); +* Bug fix: Ensure users can't enter a date that causes an age of 0. + += 7.2 = + +* Improvement: Added Czech translations (thanks @Petr) +* Improvement: Added hook "ws-ls-hook-user-preference-saved" for user preferences being saved. + += 7.1.3 = + +* Bug Fix: Tweaked the SQL for building Meta fields table + += 7.1.2 = + +* Changed purchase links to link through to https://shop.yeken.uk +* Bug fix: Don't flood help logs with license checks. +* Bug fix: Changed filter for measurements out of globals.php + += 7.1.1 = + +* Improvement: Fetch license prices from YeKen API +* Improvement: Removed redundant admin notifications code. +* Improvement: Added Polish translations - thanks Adam! + += 7.1 = + +* Improvement: Added setup wizard. +* Improvement: Upgraded Chart.js to 2.8.0 +* Improvement: Refactoring of file names. +* Improvement: Added filter "wlt-measurements" to allow filtering of measurement fields. +* Improvement: Removed redundant stats code. +* Improvement: Refactored some global constants. +* Improvement: Refactored code to remove un-needed function arguments. +* Improvement: Refactored code to remove un-needed property assignments. +* Improvement: Various refactorings of code. +* Bug Fix: Fixed "Weight Tracker Record" button at top of user header. + += 7.0.13 = + +* Improvement: Allow filtering of Post URL for Weight Entry forms. +* Improvement: Updated Hebrew translations. Thanks @Roy +* Bug fix: Changed footable dates to use UTC methods. +* Bug fix: Fixed issue where a moment was being passed into footable. + += 7.0.12 = + +* Improvement: Added URL field to awards. +* Bug fix: Fixed issue when no user side bar rows caused an error to be logged. +* Bug fix: Fixed issue with font awesome CSS not being enqueued properly. + += 7.0.11 = + += Bug Fix: Fixed an issue when looking for the functions ws_ls_harris_benedict_filter_calories_to_lose() and ws_ls_harris_benedict_filter_calories_to_add() when relevant files not included. + += 7.0.10 = + +* Bug Fix: Fixed rounding issues that caused some weight loss awards not to be issued. + += 7.0.9 = + +* New Feature: Added new shortcode to show difference between current weight and previous [wlt-weight-difference-previous] +* Improvement: Added a new setting to specify the calories required to gain weight. +* Improvement: Added the option to show and hide Gain or Loss calculations for MacroN and Calories. +* Improvement: Shortcodes now support "gain" figures. +* Improvement: New button to delete all awards for a user. +* Improvement: Replaced all intval() with (int). + += 7.0.8 = + +* Improvement: Added screens to view user's for a given group (also able to remove). +* Improvement: Added a setting enable user's to edit their group. +* Bug Fix: Fixed Latest 100 / 500 entries on user data summary to fetch latest entries instead of oldest. + += 7.0.7 = + +* Improvement: On user summary page, changed "Show All Entries" to "Show 500 most recent". On large sites, fetching all data was causing performance issues. +* Bug Fix: Fixed issues with selected="selected" randomly appearing. +* Bug fix: Removed duplicate chart opacity setting. + += 7.0.6 = + +* Improvement: Added shortcode for user's previous weight [wlt-weight-previous] +* Improvement: Issue 179. Optimised deletion of redundant stats entries. +* Improvement: Issue 195. Increased award title length to 200 characters. +* Improvement: Issue 188. Display an admin warning if the Weight Tracker license expires within 14 days! +* Improvement: Issue 177. Updated Chart.js library. + += 7.0.5 = + +* Improvement: Added additional Dutch translations. + += 7.0.4 = + +* Improvement: Added Dutch Formal (copied from Dutch). +* Improvement: Increased granularity of height values. +* Improvement: Updated plugin title and description. Removed references to "loss" from "Weight Loss Tracker". +* Improvement: When a target is cleared, redirect back to current page so UI refreshes. + += 7.0.3 = + +* Bug fix: Addressed another "Can't use function return value in write context" error in photos. + += 7.0.2 = + +* Bug fix: Addressed a "Can't use function return value in write context" error in photos. + += 7.0.1 = + +* Improvement: Added filter to allow a custom section to be inserted into user record. + += 7.0.1 = + +* Bug fix: Fixed issue with "Warning: Invalid argument supplied for foreach()" in Awards + += 7.0 = + +* New Feature: Pro Plus: Awards and Badges! Set awards for: BMI Change, BMI Equals, Weight Gain / Loss from start and Percentage of weight lost from start. Read more: https://weight.yeken.uk/awards +* New Feature: Pro: Added Groups. You can now group your members. https://weight.yeken.uk/groups +* New Feature: Pro: Birthday Emails. If enabled, automatically send a birthday email to applicable users. +* Improvement: Ability to clear log with "Clear log" button. +* Improvement: Caching can now be disabled in Settings. +* Improvement: Cache now cleared with each release (based upon version number). +* Bug fix: Fixed an issue during conversions when a non numeric value was passed. + += 6.1.1 = + +* Improvement: Updated German translations. Thanks Benjamin. +* Bug fix: Typo fix. + += 6.1 = + +* New Feature: Added a new Meta Field type of "Photos" (Pro only). This will allow site administrators to add one or more photo field per entry form. +* New Feature: Build in tool to migrate photos from old system to new. +* Improvement: Removed old photo upload and migrated to to new meta fields. +* Improvement: Added custom field data to email notifications. +* Improvement: Added additional logic to remove photos from media library when no longer used by Weight Tracker (e.g. user has deleted them) +* Improvement: Various minor tweaks to meta fields and validation. +* Improvement: Changed email format to HTML. +* Improvement: Optimised [wlt-new-users] to reduce size of data returned by query. +* Improvement: General PHP code tweaks to improve performance and maintainability ( based on PHPStorms recommendations). +* Bug fix: Class name not being correctly added to forms. + += 6.0.3 = + +* Bug fix: Fixed issues with Hebrew not loading. + += 6.0.2 = + +* Improvement: Added Hebrew. +* Bug fix: Removed error log count that check which was causing the custom fields to be added. +* Bug fix: Fixed issue where it would attempt the Custom Field default check on every admin page load! + += 6.0.1 = + +* Bug fix: Removed error log count that check which was causing the plugin not to activate. + += 6.0 = + +* New Feature: Added Custom Fields. Allow admin specified questions to be asked on weight entry forms. +* New Feature: Added Russian translations. +* Improvement: Updated Finnish translations. +* Improvement: Added error logging functionality. +* Improvement: Refactored Pro / Pro Plus features file include logic. +* Improvement: Upgraded Chart.js to 2.7.2 +* Bug Fix: Fixed PHP errors causing the log entry "PHP Warning: count(): Parameter must be an array or an object that implements Countable" + += 5.4.5 = + +* Bug Fix: Measurements are now exported (via CSV / JSON) as inches where applicable. +* Bug fix: Fixed text alignment in table headers for RTL languages. + += 5.4.4 = + +* Improvement: Added Arabic for Saudi Arabia (front end only). Thanks @Saeed + += 5.4.3 = + +* Improvement: Added new option "auto" for "progress" argument [wlt-calories progress="auto"] shortcode. It will display the calories for the aim specified by the user e.g. if they select Lose Weight it will show the calories required to lose. +* Improvement: Added new option "auto" for "progress" argument wlt-macronutrients progress="auto"] shortcode. It will display the relevant macroN for the aim specified by the user e.g. if they select Lose Weight it will show the calories required to lose. + += 5.4.2 = + +* Improvement: Added filter to allow Macro N shortcode and allowed progress options to be modified. + += 5.4.1 = + +Bug fix: Issue with is_Array() function killing certain shortcodes. + += 5.4 = + +* Improvement: Added support for Gravity Forms - read more: https://weight.yeken.uk/gravity-forms/ +* Improvement: Added filter to modify allowed wlt-if fields (wlt-filter-if-allowed-fields) +* Improvement: Added filter to allow new wlt-if conditions to be added (wlt-filter-if-condition-[field name]) +* Bug fix: Ensured object is countable before trying to count() it. +* Security fix: Added rel="noopener noreferrer" to all links that open in a new window ( i.e. target="_blank" ) + += 5.3.1 = + +* Improvement: Added filter to modify allowed wlt-if fields (wlt-filter-if-allowed-fields) +* Improvement: Added filter to allow new wlt-if conditions to be added (wlt-filter-if-condition-[field name]) + += 5.3 = + +* Improvement: Added filter to allow Activity Levels to be overridden (wlt-filter-activity-levels) +* Improvement: Added filter to allow Aims to be overridden (wlt-filter-aims) +* Improvement: Added filter to allow BMR calculation to be overridden (wlt-filter-bmr-calculation) +* Improvement: Added filter to allow Macro calculation per meal to be overridden (wlt-filter-macros-[key]) +* Improvement: Added filter to allow Macro calculations per total to be overridden (wlt-filter-macros-[key]-total) +* Improvement: Added filter to allow all Macro calculations to be overridden (wlt-filter-macros) +* Improvement: Added filter to display an additional field below gender on user preferences form (wlt-filter-user-settings-below-gender) +* Improvement: Added filter to change a user's setting ('wlt-filter-user-setting-[key]) +* Improvement: Added filter to allow calories to be overridden (wlt-filter-calories-lose) +* Improvement: Added filter to allow calories to maintain weight to be overridden (wlt-filter-calories-maintain) +* Improvement: Added filter to allow calories to lose weight to be overridden (wlt-filter-calories-lose) +* Improvement: Added filter to allow table rows to be filtered in Harris Benedict tables (wlt-filter-harris-benedict-rows) +* Improvement: Added filter to allow default macros to be specified and override WLT plugin. (wlt-filter-macros-custom) +* Improvement: Added filter to allow specify what types of calories should be converted into macros. wlt-filter-macros-calculate) +* Improvement: Added filter to allow specify what types of macros should be displayed. wlt-filter-macros-display) + += 5.2.26 = + +* Improvement: Added Slovakian translations (thanks @Richard) +* Improvement: Added a new filter "wlt-filter-form-saved-message" to allow the save confirmation on form submission to be changed. + += 5.2.25 = + +* Bug fix: Don't display notification from YeKen if it's blank! + += 5.2.24 = + +* Added additional German translations (thanks @Benjamin) + += 5.2.23 = + +* SVN Repo fix. + += 5.2.22 = + +* Bug fix: CSV export. If the column is missing in underlying data then add a dummy field. +* Bug fix: Only display users on the stats table if they still exist in WP Users table. +* Bug fix: Correct display Pro Plus license price from Yeken Data feed. +* Bug fix: Only tell YeKen of license deactivation when one actually occurs. +* Bug fix: Fixed wpdb->prepare() errors thrown on user search. +* Reviewed data santisation and where required called relevant WordPress functions to sanitise user data. +* Removed redundant files. +* Removed commented lines of code. + += 5.2.21 = + +* Added caching for user lookup. + += 5.2.20 = + +* Added tweaks to Admin search for to support future AJAX lookups. +* Added some core functions to to lookup a user's previous weight and difference between that and latest. +* Added some core functions for fetching a user and limiting search results. + += 5.2.19 = + +* Bug fix: If measurements enabled, ensure one or measurement fields have been enabled before rendering form fields. +* Added a hidden tool to fix the accuracy of Stones and Pounds to Kg. + += 5.2.18 = + +* Improvement: Added options to allow admins to specify a fill colour and opacity under the weight line on charts. +* Improvement: Added new options to allow admins to specify font family and colour for charts. +* Updated Chart.js to 2.7.1 + += 5.2.17 = + +* Improvement: Added Arabic translations (thanks Firas). +* Bug fix: Record license expired properly. +* Bug fix: Clear WLT cache when plugin has been upgraded. +* Bug fix: Fixed rounding issues in data tables causing differences to look wrong. + += 5.2.16 = + +* Improvement: Added additional argument for [wlt] shortcode that disables the check to see if [wlt] has already been placed on the page. Some users (and clashing plugins) were causing it to fail. +* Bug fix: Allow decimal entries for pounds (when in stones and pounds). +* Bug fix: When display comparison values, a rounding to one decimal place was causing the difference values to be slightly out. This has been changed to two decimals. + += 5.2.15 = + +* Bug fix: When "Server Default" was selected for Photo uploads it would not allow any photo uploads to happen. This has been fixed. +* Added helper function ws_ls_if() for simplified IF checks. + += 5.2.14 = + +* Updated Dutch translations (Thanks Robin!) + += 5.2.13 = + +* Bug fix: Sorted issue with user preferences not being saved correctly + += 5.2.12 = + +* Improvement: Refactored User preferences code so it can be extended. +* Improvement: Added new filters "wlt-filter-admin-user-sidebar-top", "wlt-filter-admin-user-sidebar-middle" and "wlt-filter-admin-user-sidebar-bottom" to allow developers to add HTML to user sidebar in "Manage Data". +* Improvement: Added new filter "wlt-filter-js-ws-ls-config" to allow developers to filter JS config. +* Improvement: Added new filter "wlt-filter-user-settings-below-aim" to allow developers to add to the User settings page. +* Improvement: Added the filters 'wlt-filter-user-settings-db-formats' and 'wlt-filter-user-settings-save-fields' to allow a developer to save other user preference fields. +* Bug fix: Stopped [wlt-calories] and [wlt-macronutrients] throwing an error when the user was logged out. Thanks @MARKONEX +* Bug fix: Fixed a bug where "Your modifications have been saved" message was always being shown on [wlt-table] shortcode. +* Database schema changes for future releases. + += 5.2.11 = + +* Fixed a PHP check on a constant that in some cases threw an exception. + += 5.2.10 = + +* Added some additional CSS to help those who have a theme that hides the [wlt] shortcode. + += 5.2.9 = + +* Removed email from being sent when License expired. Appears it is sending in some cases when the license has not expired! + += 5.2.8 = + +* Improvement: Added a new "About You" field called "Aim". This allows the user (or Admin) to specify their aim e.g. maintain, gain, or lose weight. +* Improvement: Expanded [wlt-if] to include a new field of "aim". Read more: https://weight.yeken.uk/shortcodes/ +* Improvement: Calorie caps can now be disabled by setting them to 0. +* Improvement: jQuery validation added to prompt the user to upload a smaller image if above file size limit. +* Improvement: New setting to limit the file size of images being uploaded. +* Improvement: Added check to ensure [wlt] shortcode is only placed once on a page or post. +* Improvement: An email is set to the Admin email address when the license expires. +* Improvement: License expire notifications are now sent to YeKen. +* Improvement: New hook "wlt-hook-license-expired" is fired when a license expires. +* Improvement: Removed setting "Advanced data tables?". This has been moved onto the shortcode themselves. See [wlt] argument "disable-advanced-tables". Read more: https://weight.yeken.uk/shortcodes/ +* Improvement: Removed setting "Display in tabs?". This has been moved onto the shortcode themselves. See [wlt] argument "disable-tabs". Read more: https://weight.yeken.uk/shortcodes/ +* Improvement: Merged and tidied up "User Experience" and "General" setting tabs. +* Improvement: Updated Chart.js to 2.7.0. Read more: https://github.com/chartjs/Chart.js/releases/tag/v2.7.0 +* Bug fix: Ensured the string "photo" can be translated on [wlt] shortcode. +* Bug fix: Fixed issue where the width of chart lines was being effected by the chart "width" attribute. +* Removed "width" argument from [wlt-chart]. The attribute wasn't used. +* Notifications from YeKen are on by default and disabled when +* Updated Languages. + += 5.2.7 = + +* Improvement: Added 7 day trial button +* Bug fix: Ensured the string "This field is required." can be translated. +* Bug fix: Fixed issue with empty "dob" field when using [wlt-if] shortcode. + += 5.2.6 = + +* Updated language files again :( + += 5.2.5 = + +* Updated language files + += 5.2.4 = + +* Improvement: Added an Advanced tab to [wlt] shortcode to display a BMI, BMR, Calories and Macronutrients. This tab can be hidden with the attribute "hide-tab-advanced" - Read more: https://weight.yeken.uk/shortcodes/ +* Improvement: Added a Photos tab to [wlt] shortcode to display a gallery. This tab can be hidden with the attribute "hide-tab-photos" - Read more: https://weight.yeken.uk/shortcodes/ +* Improvement: Added footable.js to Macronutrient and Calorie tables in Admin (tables looks a lot better in responsive mode). +* Improvement: Added "alternate" class for Macronutrient table to make alternative rows stand out. +* Bug fix: Ensured "No data found" can be translated on data tables. +* Bug fix: Show hamburger menu icon on tabs. + += 5.2.3 = + +Removing changes that weren't supposed to go out in 5.2.2 as they weren't completed! Apologies! + += 5.2.2 = + +* Improvement: Added footable.js to Macronutrient and Calorie tables (tables looks a lot better in responsive mode). +* Bug fix: Fixed "Can't use return function in write context" appearing in older versions of PHP. +* Bug fix: Ensured "Measurements are in" can be translated. +* Bug fix: Ensured "Search" text on new data tables can be translated. + += 5.2.1 = + +* Bug fix: Fixed issue with target weight failing to save if photos enabled. + += 5.2 = + +* Photo Uploads! + * New field on attachments "Don't show to public" (set to true by default) to stop user photo's being rendered on standard attachment pages. + * Users can now upload / replace / remove a photo alongside their weight / measurement entries. + * Admin can view all photos uploaded by a user. + * Admin can upload / replace / remove a user's photo. + * New shortcode [wlt-photo-count] to display the number of photos uploaded by the user - Read more: https://weight.yeken.uk/shortcodes/ + * New shortcode [wlt-photo-oldest] to display the user's oldest photo - Read more: https://weight.yeken.uk/shortcodes/ + * New shortcode [wlt-photo-recent] to display the user's most recent photo - Read more: https://weight.yeken.uk/shortcodes/ + * New shortcode [wlt-gallery] to display the user's most recent photo - Read more: https://weight.yeken.uk/shortcodes/ +* Improvement: Added "css-class" argument for [wlt-macronutrients-table] shortcode - Read more: https://weight.yeken.uk/shortcodes/ +* Improvement: Added "css-class" argument for [wlt-calories-table] shortcode - Read more: https://weight.yeken.uk/shortcodes/ +* Improvement: Standard Pro Users can now upgrade to Pro Plus for 50% cheaper! +* Improvement: [wlt] shortcode has a new argument "hide-photos". If set to true, the photo section of the form will be hidden. Read more: https://weight.yeken.uk/shortcodes/ +* Improvement: Added field "photo" to [wlt-if] shortcode. Allows you to check if the user has uploaded a photo. +* Improvement: New hook "wlt-hook-data-entry-deleted" created. Fired when an entry is deleted. +* Improvement: Removed DataTables.js and replaced with Footable.js for advanced data tables. This keeps the front end consistent with admin area. +* Improvement: [wlt-table] has a new argument to disable data being edited / deleted "enable-add-edit". Read more: https://weight.yeken.uk/shortcodes/ +* Improvement: [wlt-table] user's now have the option to edit their data with this shortcode (not just delete). +* Improvement: Tweaked form headers to say "Edit" intead of "Add" when editing an entry. +* Improvement: Editing an entry is done using PHP and HTML. jQuery / Ajax has been removed so more reliable. +* Improvement: Re-factored all