Plugin Directory

Changeset 3235577


Ignore:
Timestamp:
02/05/2025 05:26:56 PM (14 months ago)
Author:
aliakro
Message:

Update to version 10.20 from GitHub

Location:
weight-loss-tracker
Files:
8 edited
1 copied

Legend:

Unmodified
Added
Removed
  • weight-loss-tracker/tags/10.20/includes/functions.php

    r3226656 r3235577  
    14531453
    14541454/**
     1455 * Fetch a user's email address
     1456 * @param $user_id
     1457 * @return string
     1458 */
     1459function ws_ls_user_email_address( $user_id ) {
     1460
     1461    if ( true === empty( $user_id ) ) {
     1462        return '';
     1463    }
     1464
     1465    if ( $cache = ws_ls_cache_user_get( $user_id, 'email-address' ) ) {
     1466        return $cache;
     1467    }
     1468   
     1469    $user           = get_user_by( 'id', $user_id );
     1470    $email_address  = ( false === empty( $user ) ) ? $user->user_email : '';
     1471
     1472    ws_ls_cache_user_set( $user_id, 'email-address', $email_address );
     1473
     1474    return $email_address;
     1475}
     1476
     1477/**
    14551478 * Challenges enabled?
    14561479 * @return bool
  • weight-loss-tracker/tags/10.20/pro-features/export/functions.php

    r3226656 r3235577  
    204204        'user_id'                       => 'User ID',
    205205        'user_nicename'                 => 'Nicename',
     206        'user_email'                    => 'Email Address',
    206207        'date-display'                  => 'Date',
    207208        'weight'                        => ws_ls_settings_weight_unit_readable(),
     
    243244
    244245    $data[ 'user_nicename' ]    = ws_ls_user_display_name( $data[ 'user_id' ] );
     246    $data[ 'user_email' ]       = ws_ls_user_email_address( $data[ 'user_id' ] );
    245247    $data[ 'date-display' ]     = ( '0000-00-00 00:00:00' !== $data[ 'weight_date' ] ) ? ws_ls_convert_ISO_date_into_locale( $data[ 'weight_date' ], 'display-date' ) : '00/00/0000';
    246248    $has_weight                 = ! empty( $data['kg'] );
  • weight-loss-tracker/tags/10.20/readme.txt

    r3226656 r3235577  
    33Tags: weight,tracker,chart,history,macronutrient
    44Requires at least: 6.0
    5 Tested up to: 6.5
    6 Stable tag: 10.19
     5Tested up to: 6.7.1
     6Stable tag: 10.20
    77Requires PHP: 7.4
    88License: GPLv2 or later
     
    163163
    164164== Changelog ==
     165
     166= 10.20 =
     167
     168* Improvement: Added "Email Address" to CSV exports.
    165169
    166170= 10.19 =
  • weight-loss-tracker/tags/10.20/weight-loss-tracker.php

    r3226656 r3235577  
    66 * Plugin Name:         Weight Tracker
    77 * 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.
    8  * Version:             10.19
     8 * Version:             10.20
    99 * Requires at least:   6.0
    10  * Tested up to:        6.5
     10 * Tested up to:        6.7.1
    1111 * Requires PHP:        7.4
    1212 * Author:              Ali Colville
     
    1818 */
    1919
    20 define( 'WE_LS_CURRENT_VERSION', '10.19' );
     20define( 'WE_LS_CURRENT_VERSION', '10.20' );
    2121define( 'WS_LS_ABSPATH', plugin_dir_path( __FILE__ ) );
    2222define( 'WS_LS_BASE_URL', plugin_dir_url( __FILE__ ) );
  • weight-loss-tracker/trunk/includes/functions.php

    r3226656 r3235577  
    14531453
    14541454/**
     1455 * Fetch a user's email address
     1456 * @param $user_id
     1457 * @return string
     1458 */
     1459function ws_ls_user_email_address( $user_id ) {
     1460
     1461    if ( true === empty( $user_id ) ) {
     1462        return '';
     1463    }
     1464
     1465    if ( $cache = ws_ls_cache_user_get( $user_id, 'email-address' ) ) {
     1466        return $cache;
     1467    }
     1468   
     1469    $user           = get_user_by( 'id', $user_id );
     1470    $email_address  = ( false === empty( $user ) ) ? $user->user_email : '';
     1471
     1472    ws_ls_cache_user_set( $user_id, 'email-address', $email_address );
     1473
     1474    return $email_address;
     1475}
     1476
     1477/**
    14551478 * Challenges enabled?
    14561479 * @return bool
  • weight-loss-tracker/trunk/pro-features/export/functions.php

    r3226656 r3235577  
    204204        'user_id'                       => 'User ID',
    205205        'user_nicename'                 => 'Nicename',
     206        'user_email'                    => 'Email Address',
    206207        'date-display'                  => 'Date',
    207208        'weight'                        => ws_ls_settings_weight_unit_readable(),
     
    243244
    244245    $data[ 'user_nicename' ]    = ws_ls_user_display_name( $data[ 'user_id' ] );
     246    $data[ 'user_email' ]       = ws_ls_user_email_address( $data[ 'user_id' ] );
    245247    $data[ 'date-display' ]     = ( '0000-00-00 00:00:00' !== $data[ 'weight_date' ] ) ? ws_ls_convert_ISO_date_into_locale( $data[ 'weight_date' ], 'display-date' ) : '00/00/0000';
    246248    $has_weight                 = ! empty( $data['kg'] );
  • weight-loss-tracker/trunk/readme.txt

    r3226656 r3235577  
    33Tags: weight,tracker,chart,history,macronutrient
    44Requires at least: 6.0
    5 Tested up to: 6.5
    6 Stable tag: 10.19
     5Tested up to: 6.7.1
     6Stable tag: 10.20
    77Requires PHP: 7.4
    88License: GPLv2 or later
     
    163163
    164164== Changelog ==
     165
     166= 10.20 =
     167
     168* Improvement: Added "Email Address" to CSV exports.
    165169
    166170= 10.19 =
  • weight-loss-tracker/trunk/weight-loss-tracker.php

    r3226656 r3235577  
    66 * Plugin Name:         Weight Tracker
    77 * 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.
    8  * Version:             10.19
     8 * Version:             10.20
    99 * Requires at least:   6.0
    10  * Tested up to:        6.5
     10 * Tested up to:        6.7.1
    1111 * Requires PHP:        7.4
    1212 * Author:              Ali Colville
     
    1818 */
    1919
    20 define( 'WE_LS_CURRENT_VERSION', '10.19' );
     20define( 'WE_LS_CURRENT_VERSION', '10.20' );
    2121define( 'WS_LS_ABSPATH', plugin_dir_path( __FILE__ ) );
    2222define( 'WS_LS_BASE_URL', plugin_dir_url( __FILE__ ) );
Note: See TracChangeset for help on using the changeset viewer.