Plugin Directory

Changeset 3171627


Ignore:
Timestamp:
10/18/2024 05:34:49 PM (18 months ago)
Author:
aliakro
Message:

Update to version 10.16 from GitHub

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

Legend:

Unmodified
Added
Removed
  • weight-loss-tracker/tags/10.16/pro-features/plus/photos.php

    r3145588 r3171627  
    7575
    7676    $arguments = shortcode_atts([
    77         'css-class' => '',
    78         'error-message' => esc_html__('No recent photo found.', WE_LS_SLUG ),
    79         'height' => 200,
    80         'hide-date' => false,
    81         'user-id' => get_current_user_id(),
    82         'recent' => true,
    83         'width' => 200,
    84         'custom-fields-to-use' => '',
    85         'maximum' => 1
     77        'css-class'             => '',
     78        'error-message'         => esc_html__('No recent photo found.', WE_LS_SLUG ),
     79        'height'                => 200,
     80        'hide-date'             => false,
     81        'user-id'               => get_current_user_id(),
     82        'recent'                => true,
     83        'width'                 => 200,
     84        'custom-fields-to-use'  => '',
     85        'maximum'               => 1,
     86        'custom-size'           => ''
    8687    ], $user_defined_arguments );
    8788
     
    9697    // Fetch photo
    9798    $photos = ws_ls_photos_db_get_recent_or_latest( $arguments['user-id'], $arguments['recent'], $arguments['width'],
    98                                                         $arguments['height'], $arguments['custom-fields-to-use'], true );
     99                                                        $arguments['height'], $arguments['custom-fields-to-use'], true, $arguments['custom-size'] );
    99100
    100101    if ( false === empty( $photos ) ) {
     
    173174                                                            $height = 200,
    174175                                                                $meta_fields_to_use = '',
    175                                                                     $hide_from_shortcodes = false ) {
     176                                                                    $hide_from_shortcodes = false,
     177                                                                        $custom_wp_size = NULL ) {
    176178
    177179    $user_id = (true === empty($user_id)) ? get_current_user_id() : $user_id;
     
    219221            }
    220222
    221             $photo_src = ws_ls_photo_get( $photo['photo_id'], $width, $height );
     223            $photo_src = ws_ls_photo_get( $photo['photo_id'], $width, $height, true, NULL, $custom_wp_size );
    222224
    223225            if ( false === empty( $photo_src ) ) {
     
    411413 * @return bool
    412414 */
    413 function ws_ls_photo_get( $attachment_id, $width = 200, $height = 200, $include_full_url = true, $css_class = NULL ) {
    414 
     415function ws_ls_photo_get( $attachment_id, $width = 200, $height = 200, $include_full_url = true, $css_class = NULL, $custom_wp_size = NULL ) {
     416   
    415417    $attributes = ( false === empty( $css_class ) ) ? [ 'class' => $css_class ] : '';
    416 
    417     $photo['thumb'] = wp_get_attachment_image( $attachment_id, array( $width, $height), false, $attributes );
     418    $size       = !empty( $custom_wp_size ) ? $custom_wp_size : [ $width, $height ];
     419   
     420    $photo['thumb'] = wp_get_attachment_image( $attachment_id, $size, false, $attributes );
    418421
    419422    if ( false === empty( $photo['thumb'] )) {
  • weight-loss-tracker/tags/10.16/readme.txt

    r3170742 r3171627  
    44Requires at least: 6.0
    55Tested up to: 6.5
    6 Stable tag: 10.15.1
     6Stable tag: 10.16
    77Requires PHP: 7.4
    88License: GPLv2 or later
     
    167167== Upgrade Notice ==
    168168
    169 10.9: New user settings for opting in and out of email notifications.
     16910.16: New feature: Added argument "custom-size" to shortcodes [wt-photo-oldest] and [wt-photo-recent]. Read more at https://docs.yeken.uk/custom-sizes.html.
    170170
    171171== Changelog ==
     172
     173= 10.16 =
     174
     175* New feature: Added argument "custom-size" to shortcodes [wt-photo-oldest] and [wt-photo-recent]. Read more at https://docs.yeken.uk/custom-sizes.html.
    172176
    173177= 10.15.1 =
  • weight-loss-tracker/tags/10.16/weight-loss-tracker.php

    r3170742 r3171627  
    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.15.1
     8 * Version:             10.16
    99 * Requires at least:   6.0
    1010 * Tested up to:        6.5
     
    1818 */
    1919
    20 define( 'WE_LS_CURRENT_VERSION', '10.15.1' );
     20define( 'WE_LS_CURRENT_VERSION', '10.16' );
    2121define( 'WS_LS_ABSPATH', plugin_dir_path( __FILE__ ) );
    2222define( 'WS_LS_BASE_URL', plugin_dir_url( __FILE__ ) );
  • weight-loss-tracker/trunk/pro-features/plus/photos.php

    r3145588 r3171627  
    7575
    7676    $arguments = shortcode_atts([
    77         'css-class' => '',
    78         'error-message' => esc_html__('No recent photo found.', WE_LS_SLUG ),
    79         'height' => 200,
    80         'hide-date' => false,
    81         'user-id' => get_current_user_id(),
    82         'recent' => true,
    83         'width' => 200,
    84         'custom-fields-to-use' => '',
    85         'maximum' => 1
     77        'css-class'             => '',
     78        'error-message'         => esc_html__('No recent photo found.', WE_LS_SLUG ),
     79        'height'                => 200,
     80        'hide-date'             => false,
     81        'user-id'               => get_current_user_id(),
     82        'recent'                => true,
     83        'width'                 => 200,
     84        'custom-fields-to-use'  => '',
     85        'maximum'               => 1,
     86        'custom-size'           => ''
    8687    ], $user_defined_arguments );
    8788
     
    9697    // Fetch photo
    9798    $photos = ws_ls_photos_db_get_recent_or_latest( $arguments['user-id'], $arguments['recent'], $arguments['width'],
    98                                                         $arguments['height'], $arguments['custom-fields-to-use'], true );
     99                                                        $arguments['height'], $arguments['custom-fields-to-use'], true, $arguments['custom-size'] );
    99100
    100101    if ( false === empty( $photos ) ) {
     
    173174                                                            $height = 200,
    174175                                                                $meta_fields_to_use = '',
    175                                                                     $hide_from_shortcodes = false ) {
     176                                                                    $hide_from_shortcodes = false,
     177                                                                        $custom_wp_size = NULL ) {
    176178
    177179    $user_id = (true === empty($user_id)) ? get_current_user_id() : $user_id;
     
    219221            }
    220222
    221             $photo_src = ws_ls_photo_get( $photo['photo_id'], $width, $height );
     223            $photo_src = ws_ls_photo_get( $photo['photo_id'], $width, $height, true, NULL, $custom_wp_size );
    222224
    223225            if ( false === empty( $photo_src ) ) {
     
    411413 * @return bool
    412414 */
    413 function ws_ls_photo_get( $attachment_id, $width = 200, $height = 200, $include_full_url = true, $css_class = NULL ) {
    414 
     415function ws_ls_photo_get( $attachment_id, $width = 200, $height = 200, $include_full_url = true, $css_class = NULL, $custom_wp_size = NULL ) {
     416   
    415417    $attributes = ( false === empty( $css_class ) ) ? [ 'class' => $css_class ] : '';
    416 
    417     $photo['thumb'] = wp_get_attachment_image( $attachment_id, array( $width, $height), false, $attributes );
     418    $size       = !empty( $custom_wp_size ) ? $custom_wp_size : [ $width, $height ];
     419   
     420    $photo['thumb'] = wp_get_attachment_image( $attachment_id, $size, false, $attributes );
    418421
    419422    if ( false === empty( $photo['thumb'] )) {
  • weight-loss-tracker/trunk/readme.txt

    r3170742 r3171627  
    44Requires at least: 6.0
    55Tested up to: 6.5
    6 Stable tag: 10.15.1
     6Stable tag: 10.16
    77Requires PHP: 7.4
    88License: GPLv2 or later
     
    167167== Upgrade Notice ==
    168168
    169 10.9: New user settings for opting in and out of email notifications.
     16910.16: New feature: Added argument "custom-size" to shortcodes [wt-photo-oldest] and [wt-photo-recent]. Read more at https://docs.yeken.uk/custom-sizes.html.
    170170
    171171== Changelog ==
     172
     173= 10.16 =
     174
     175* New feature: Added argument "custom-size" to shortcodes [wt-photo-oldest] and [wt-photo-recent]. Read more at https://docs.yeken.uk/custom-sizes.html.
    172176
    173177= 10.15.1 =
  • weight-loss-tracker/trunk/weight-loss-tracker.php

    r3170742 r3171627  
    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.15.1
     8 * Version:             10.16
    99 * Requires at least:   6.0
    1010 * Tested up to:        6.5
     
    1818 */
    1919
    20 define( 'WE_LS_CURRENT_VERSION', '10.15.1' );
     20define( 'WE_LS_CURRENT_VERSION', '10.16' );
    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.