Changeset 3171627
- Timestamp:
- 10/18/2024 05:34:49 PM (18 months ago)
- Location:
- weight-loss-tracker
- Files:
-
- 6 edited
- 1 copied
-
tags/10.16 (copied) (copied from weight-loss-tracker/trunk)
-
tags/10.16/pro-features/plus/photos.php (modified) (5 diffs)
-
tags/10.16/readme.txt (modified) (2 diffs)
-
tags/10.16/weight-loss-tracker.php (modified) (2 diffs)
-
trunk/pro-features/plus/photos.php (modified) (5 diffs)
-
trunk/readme.txt (modified) (2 diffs)
-
trunk/weight-loss-tracker.php (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
weight-loss-tracker/tags/10.16/pro-features/plus/photos.php
r3145588 r3171627 75 75 76 76 $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' => '' 86 87 ], $user_defined_arguments ); 87 88 … … 96 97 // Fetch photo 97 98 $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'] ); 99 100 100 101 if ( false === empty( $photos ) ) { … … 173 174 $height = 200, 174 175 $meta_fields_to_use = '', 175 $hide_from_shortcodes = false ) { 176 $hide_from_shortcodes = false, 177 $custom_wp_size = NULL ) { 176 178 177 179 $user_id = (true === empty($user_id)) ? get_current_user_id() : $user_id; … … 219 221 } 220 222 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 ); 222 224 223 225 if ( false === empty( $photo_src ) ) { … … 411 413 * @return bool 412 414 */ 413 function ws_ls_photo_get( $attachment_id, $width = 200, $height = 200, $include_full_url = true, $css_class = NULL ) {414 415 function ws_ls_photo_get( $attachment_id, $width = 200, $height = 200, $include_full_url = true, $css_class = NULL, $custom_wp_size = NULL ) { 416 415 417 $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 ); 418 421 419 422 if ( false === empty( $photo['thumb'] )) { -
weight-loss-tracker/tags/10.16/readme.txt
r3170742 r3171627 4 4 Requires at least: 6.0 5 5 Tested up to: 6.5 6 Stable tag: 10.1 5.16 Stable tag: 10.16 7 7 Requires PHP: 7.4 8 8 License: GPLv2 or later … … 167 167 == Upgrade Notice == 168 168 169 10. 9: New user settings for opting in and out of email notifications.169 10.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. 170 170 171 171 == 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. 172 176 173 177 = 10.15.1 = -
weight-loss-tracker/tags/10.16/weight-loss-tracker.php
r3170742 r3171627 6 6 * Plugin Name: Weight Tracker 7 7 * 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.1 5.18 * Version: 10.16 9 9 * Requires at least: 6.0 10 10 * Tested up to: 6.5 … … 18 18 */ 19 19 20 define( 'WE_LS_CURRENT_VERSION', '10.1 5.1' );20 define( 'WE_LS_CURRENT_VERSION', '10.16' ); 21 21 define( 'WS_LS_ABSPATH', plugin_dir_path( __FILE__ ) ); 22 22 define( 'WS_LS_BASE_URL', plugin_dir_url( __FILE__ ) ); -
weight-loss-tracker/trunk/pro-features/plus/photos.php
r3145588 r3171627 75 75 76 76 $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' => '' 86 87 ], $user_defined_arguments ); 87 88 … … 96 97 // Fetch photo 97 98 $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'] ); 99 100 100 101 if ( false === empty( $photos ) ) { … … 173 174 $height = 200, 174 175 $meta_fields_to_use = '', 175 $hide_from_shortcodes = false ) { 176 $hide_from_shortcodes = false, 177 $custom_wp_size = NULL ) { 176 178 177 179 $user_id = (true === empty($user_id)) ? get_current_user_id() : $user_id; … … 219 221 } 220 222 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 ); 222 224 223 225 if ( false === empty( $photo_src ) ) { … … 411 413 * @return bool 412 414 */ 413 function ws_ls_photo_get( $attachment_id, $width = 200, $height = 200, $include_full_url = true, $css_class = NULL ) {414 415 function ws_ls_photo_get( $attachment_id, $width = 200, $height = 200, $include_full_url = true, $css_class = NULL, $custom_wp_size = NULL ) { 416 415 417 $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 ); 418 421 419 422 if ( false === empty( $photo['thumb'] )) { -
weight-loss-tracker/trunk/readme.txt
r3170742 r3171627 4 4 Requires at least: 6.0 5 5 Tested up to: 6.5 6 Stable tag: 10.1 5.16 Stable tag: 10.16 7 7 Requires PHP: 7.4 8 8 License: GPLv2 or later … … 167 167 == Upgrade Notice == 168 168 169 10. 9: New user settings for opting in and out of email notifications.169 10.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. 170 170 171 171 == 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. 172 176 173 177 = 10.15.1 = -
weight-loss-tracker/trunk/weight-loss-tracker.php
r3170742 r3171627 6 6 * Plugin Name: Weight Tracker 7 7 * 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.1 5.18 * Version: 10.16 9 9 * Requires at least: 6.0 10 10 * Tested up to: 6.5 … … 18 18 */ 19 19 20 define( 'WE_LS_CURRENT_VERSION', '10.1 5.1' );20 define( 'WE_LS_CURRENT_VERSION', '10.16' ); 21 21 define( 'WS_LS_ABSPATH', plugin_dir_path( __FILE__ ) ); 22 22 define( 'WS_LS_BASE_URL', plugin_dir_url( __FILE__ ) );
Note: See TracChangeset
for help on using the changeset viewer.