Skip to content

Commit

Permalink
Merge pull request #81 from yekenuk/5.0.4
Browse files Browse the repository at this point in the history
5.0.4
  • Loading branch information
alicolville authored Aug 14, 2017
2 parents 61b0507 + 35cdfb1 commit 30ea1fb
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 12 deletions.
18 changes: 9 additions & 9 deletions includes/hooks.php
Original file line number Diff line number Diff line change
Expand Up @@ -88,14 +88,14 @@ function ws_ls_enqueue_files(){
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);
wp_enqueue_script('ws-ls-js', plugins_url( '../js/ws-ls' . $minified . '.js', __FILE__ ), array(), WE_LS_CURRENT_VERSION, true);
wp_enqueue_script('ws-ls-js-form', plugins_url( '../js/ws-ls-entry-form.js', __FILE__ ), array(), WE_LS_CURRENT_VERSION, true);

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);
wp_enqueue_script('ws-ls-chart-js', WE_LS_CDN_CHART_JS, array( 'jquery', 'ws-ls-js' ), WE_LS_CURRENT_VERSION);
wp_enqueue_script('jquery-chart-ws-ls', plugins_url( '../js/ws-ls-chart' . $minified . '.js', __FILE__ ), array('ws-ls-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());
wp_localize_script('ws-ls-js', 'ws_ls_config', ws_ls_get_js_config());

// Tabs enabled?
if (WE_LS_USE_TABS) {
Expand Down Expand Up @@ -141,8 +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'] ) {
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_enqueue_script('ws-ls-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('ws-ls-chart-js'), WE_LS_CURRENT_VERSION, true);
wp_localize_script('jquery-chart-ws-ls', 'ws_ls_config', ws_ls_get_js_config());
}
}
Expand All @@ -161,8 +161,8 @@ function ws_ls_enqueue_form_dependencies() {
wp_enqueue_script('jquery-ui-datepicker');
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('wl-ls-js', plugins_url( '../js/ws-ls-entry-form' . $minified . '.js', __FILE__ ), array(), WE_LS_CURRENT_VERSION, true);
wp_localize_script('wl-ls-js', 'ws_ls_config', ws_ls_get_js_config());
wp_enqueue_script('ws-ls-js', plugins_url( '../js/ws-ls-entry-form' . $minified . '.js', __FILE__ ), array(), WE_LS_CURRENT_VERSION, true);
wp_localize_script('ws-ls-js', 'ws_ls_config', ws_ls_get_js_config());
}

function ws_ls_use_minified() {
Expand Down
6 changes: 5 additions & 1 deletion 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.3
Stable tag: 5.0.4
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 @@ -160,6 +160,10 @@ Yes. In WordPress Admin goto Settings > Weight Loss Tracker and change the setti

== Changelog ==

= 5.0.4 =

* Bug fix: Fixed missing charts doe to clashes with other plugins. JS enqueue issue where other plugins were using Chart.js (myCred in this example) with the same enqueue slug.

= 5.0.3 =

* Bug fix: Fixed JS issue where charts were only being rendered for Pro users!
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.3
* Version: 5.0.4
* 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.3');
define('WE_LS_CURRENT_VERSION', '5.0.4');
define('WE_LS_DB_VERSION', '5.0.0');

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

0 comments on commit 30ea1fb

Please sign in to comment.