Skip to content

Commit

Permalink
Merge pull request #79 from yekenuk/5.0.2
Browse files Browse the repository at this point in the history
5.0.2
  • Loading branch information
alicolville authored Aug 12, 2017
2 parents 17e50c3 + b1946dc commit 4095f31
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 17 deletions.
1 change: 1 addition & 0 deletions includes/globals.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
define('WE_LS_SLUG', 'weight-loss-tracker');
define('WE_LS_DATA_URL', 'https://weight.yeken.uk/wlt/plugin-info.json');
define('WE_LS_STATS_URL', 'https://weight.yeken.uk/wlt/stats.php');
define('WE_LS_CDN_CHART_JS', 'https://cdnjs.cloudflare.com/ajax/libs/Chart.js/2.6.0/Chart.min.js');
define('WE_LS_TABLENAME', 'WS_LS_DATA');
define('WE_LS_TARGETS_TABLENAME', 'WS_LS_DATA_TARGETS');
define('WE_LS_USER_PREFERENCES_TABLENAME', 'WS_LS_DATA_USER_PREFERENCES');
Expand Down
19 changes: 7 additions & 12 deletions includes/hooks.php
Original file line number Diff line number Diff line change
Expand Up @@ -84,15 +84,17 @@ function ws_ls_enqueue_files(){
$minified = ws_ls_use_minified();

// JavaScript files
ws_ls_enqueue_chart_dependencies();
wp_enqueue_script('jquery-validate',plugins_url( '../js/jquery.validate.min.js', __FILE__ ), array('jquery'), WE_LS_CURRENT_VERSION);
wp_enqueue_script('jquery-validate',plugins_url( '../js/jquery.validate.min.js', __FILE__ ), array('jquery'), WE_LS_CURRENT_VERSION);
wp_enqueue_script('jquery-validate-additional',plugins_url( '../js/additional-methods.min.js', __FILE__ ), array('jquery', 'jquery-validate'), WE_LS_CURRENT_VERSION);

wp_enqueue_script('jquery-ui-datepicker');
wp_enqueue_script('wl-ls-js', plugins_url( '../js/ws-ls' . $minified . '.js', __FILE__ ), array(), WE_LS_CURRENT_VERSION, true);
wp_enqueue_script('wl-ls-js-form', plugins_url( '../js/ws-ls-entry-form.js', __FILE__ ), array(), WE_LS_CURRENT_VERSION, true);

// Add localization data for JS
wp_enqueue_script('chart-js', WE_LS_CDN_CHART_JS, array( 'jquery', 'wl-ls-js' ), WE_LS_CURRENT_VERSION);
wp_enqueue_script('jquery-chart-ws-ls', plugins_url( '../js/ws-ls-chart' . $minified . '.js', __FILE__ ), array('chart-js'), WE_LS_CURRENT_VERSION, true);

// Add localization data for JS
wp_localize_script('wl-ls-js', 'ws_ls_config', ws_ls_get_js_config());

// Tabs enabled?
Expand Down Expand Up @@ -139,7 +141,8 @@ function ws_ls_enqueue_admin_files(){
if(in_array($_GET['mode'], ['entry', 'user-settings'])) {
ws_ls_enqueue_form_dependencies();
} else if ('user' == $_GET['mode'] ) {
ws_ls_enqueue_chart_dependencies();
wp_enqueue_script('chart-js', WE_LS_CDN_CHART_JS, array( 'jquery' ), WE_LS_CURRENT_VERSION);
wp_enqueue_script('jquery-chart-ws-ls', plugins_url( '../js/ws-ls-chart' . $minified . '.js', __FILE__ ), array('chart-js'), WE_LS_CURRENT_VERSION, true);
wp_localize_script('jquery-chart-ws-ls', 'ws_ls_config', ws_ls_get_js_config());
}
}
Expand All @@ -162,14 +165,6 @@ function ws_ls_enqueue_form_dependencies() {
wp_localize_script('wl-ls-js', 'ws_ls_config', ws_ls_get_js_config());
}

function ws_ls_enqueue_chart_dependencies() {

$minified = ws_ls_use_minified();

wp_enqueue_script('chart-js', 'https://cdnjs.cloudflare.com/ajax/libs/Chart.js/2.5.0/Chart.min.js', array( 'jquery' ), WE_LS_CURRENT_VERSION);
wp_enqueue_script('jquery-chart-ws-ls', plugins_url( '../js/ws-ls-chart' . $minified . '.js', __FILE__ ), array('chart-js'), WE_LS_CURRENT_VERSION, true);
}

function ws_ls_use_minified() {
return (defined('SCRIPT_DEBUG') && false == SCRIPT_DEBUG) ? '.min' : '';
}
Expand Down
10 changes: 7 additions & 3 deletions readme.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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.4.0
Tested up to: 4.8
Stable tag: 5.0.1
Stable tag: 5.0.2
License: GPLv2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Donate Link: https://www.paypal.me/yeken
Expand Down Expand Up @@ -49,8 +49,8 @@ Also supports the following tags:

Our Pro version has now been released! If you upgrade, you get the additional features:

* **Admin can view, edit and delete user data. Various tools for viewing user's graphs, tables of entries, BMI, targets, weight lost / gained stats and much more.
* **CSV and JSON exports for all data or a particular user.
* **Admin can view, edit and delete user data.** Various tools for viewing user's graphs, tables of entries, BMI, targets, weight lost / gained stats and much more.
* **CSV and JSON exports** for all data or a particular user.
* **Measurements.** Support for recording measurements like Hip, Waist, Leg, Bicep, etc. Displayed on charts and tables.
* **BMI.** Allows a user to specify their height. Once specified, their BMI is displayed next to each weight entry. There is also a shortcode to render the latest BMI.
* **Email notifications.** Receive email notifications when a person updates their target or adds / edits a weight.
Expand Down Expand Up @@ -160,6 +160,10 @@ Yes. In WordPress Admin goto Settings > Weight Loss Tracker and change the setti

== Changelog ==

= 5.0.2 =

* Bug fix: Fixed an issue where JS enqueue order was causing some charts not to appear in IE.

= 5.0.1 =

* Bug fix: Re-instated JS required (on all admin screens) to dismiss WLT admin notifications.
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 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: 5.0.1
* Version: 5.0.2
* Author: YeKen
* Author URI: https://www.YeKen.uk
* License: GPL2
Expand All @@ -28,7 +28,7 @@
*/

define('WS_LS_ABSPATH', plugin_dir_path( __FILE__ ));
define('WE_LS_CURRENT_VERSION', '5.0.1');
define('WE_LS_CURRENT_VERSION', '5.0.2');
define('WE_LS_DB_VERSION', '5.0.0');

// -----------------------------------------------------------------------------------------
Expand Down

0 comments on commit 4095f31

Please sign in to comment.