Skip to content

Commit

Permalink
Merge pull request #566 from alicolville/remove-legacy
Browse files Browse the repository at this point in the history
10.7
  • Loading branch information
alicolville committed Sep 11, 2023
2 parents 83748a5 + 941ea9d commit 57bf8e7
Show file tree
Hide file tree
Showing 59 changed files with 206 additions and 823 deletions.
18 changes: 0 additions & 18 deletions assets/js/ws-ls.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,24 +24,6 @@ jQuery( document ).ready( function ( $ ) {
function() { window.location.replace( ws_ls_config[ 'current-url' ] + '?target-cleared=true&wt-user-id=' + user_id ) } );
});

// -----------------------------------------------------------------------
// Tabs (ZoZo)
// -----------------------------------------------------------------------

// Just saved data or cancelled? If so, set default Tab to be "In Detail"
let default_tab = ( ws_ls_querystring_value( 'ws-edit-saved' ) || ws_ls_querystring_value( 'ws-edit-cancel' ) ) ? 'tab2' : 'tab1';

let tabs_are_ready = function( event, item ) {
$( '#ws-ls-tabs-loading' ).addClass( 'ws-ls-hide' );
$( '#' + item.id ).addClass( 'ws-ls-force-show' );
$( '#' + item.id ).removeClass( 'ws-ls-hide' );
};

ws_ls_config[ 'tab-config' ][ 'defaultTab' ] = default_tab;
ws_ls_config[ 'tab-config' ][ 'ready' ] = tabs_are_ready;

tabs_global = $( '#ws-ls-tabs' ).zozoTabs( ws_ls_config[ 'tab-config' ] );

// -----------------------------------------------------------------------
// Progress Bar
// -----------------------------------------------------------------------
Expand Down
2 changes: 1 addition & 1 deletion assets/js/ws-ls.min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 0 additions & 1 deletion docs/shortcodes.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,6 @@ The majority of the public facing functionality are implemented using [WordPress
|[[wt-group-view-as-table]]({{ site.baseurl }}/shortcodes/wt-group-view-as-table.html)|Display a table of summary information for users within a given [group]({{ site.baseurl }}/groups.html).
|[[wt-waist-to-hip-ratio-calculator]]({{ site.baseurl }}/shortcodes/wt-waist-to-hip-ratio-calculator.html)|Displays a Waist-to-Hip ratio calculator for your users to use.|
|[[wt-if]]({{ site.baseurl }}/shortcodes/wt-if.html)|Add conditional display logic based on whether WT data has been completed or not.|
|[[wt-legacy]]({{ site.baseurl }}/shortcodes/wt-legacy.html) |A legacy version of [[wt]]({{ site.baseurl }}/shortcodes/wt.html).|
|[[wt-league-table]]({{ site.baseurl }}/shortcodes/wt-league-table.html)|Display a league table of Weight Tracker users.|
|[[wt-macronutrients]]({{ site.baseurl }}/shortcodes/wt-macronutrients.html)|Displays a macronutrient figure from the macronutrient intake calculations.|
|[[wt-macronutrients-table]]({{ site.baseurl }}/shortcodes/wt-macronutrients-table.html)|Displays recommendations on the best way to split your calorie intake.|
Expand Down
77 changes: 0 additions & 77 deletions docs/shortcodes/wt-legacy.md

This file was deleted.

4 changes: 2 additions & 2 deletions includes/admin-pages/awards/page-awards-add-update.php
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ function ws_ls_awards_add_update_page() {
$mandatory_fields = array_merge( $mandatory_fields, [ 'weight_percentage' ] );
} else if ( 'weight' === $award['category'] ) {
if( ws_ls_setting( 'use-imperial' ) ) {
if ( 'stones_pounds' === ws_ls_setting( 'weight-unit' ) ) {
if ( 'stones_pounds' === ws_ls_setting() ) {
$mandatory_fields = array_merge( $mandatory_fields, [ 'stones', 'pounds' ] );
$award['value'] = ws_ls_convert_stones_pounds_to_kg( $award['stones'], $award['pounds'] );
} else {
Expand Down Expand Up @@ -159,7 +159,7 @@ function ws_ls_awards_add_update_page() {

if( ws_ls_setting( 'use-imperial' ) ) {

if ( 'stones_pounds' === ws_ls_setting( 'weight-unit' ) ) {
if ( 'stones_pounds' === ws_ls_setting() ) {

if ( true === $validation_fail ) {
$weight['stones'] = $award['stones'];
Expand Down

0 comments on commit 57bf8e7

Please sign in to comment.