Changeset 3653359
- Timestamp:
- 08/18/2026 05:57:28 PM (2 months ago)
- Location:
- donation-thermometer/trunk
- Files:
-
- 3 edited
-
donation_therm.php (modified) (1 diff)
-
includes/therm_widget.php (modified) (2 diffs)
-
readme.txt (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
donation-thermometer/trunk/donation_therm.php
r3596038 r3653359 4 4 Plugin URI: https://rhewlif.xyz/thermometer 5 5 Description: Displays customisable thermometers for tracking donations using the shortcode <code>[thermometer raised=?? target=??]</code>. Shortcodes for raised/target/percentage text values are also available for posts/pages/text widgets: <code>[therm_r]</code> / <code>[therm_t]</code> / <code>[therm_%]</code>. 6 Version: 2.2. 96 Version: 2.2.10 7 7 Author: Henry Patton 8 8 Text Domain: donation-thermometer -
donation-thermometer/trunk/includes/therm_widget.php
r2937808 r3653359 1 1 <?php 2 /**3 * This file could be used to catch submitted form data. When using a non-configuration4 * view to save form data, remember to use some kind of identifying field in your form.5 */6 2 7 3 if(self::get_thermometer_widget_option('thousands') == ' (space)'){ … … 16 12 $decsep = (self::get_thermometer_widget_option('decsep') == ', (comma)') ? ',' : '.'; 17 13 $decimals = intval(self::get_thermometer_widget_option('decimals')); 18 $raisedA = explode(';',self::get_thermometer_widget_option('raised_string')); 14 15 $raised_str = (string)(self::get_thermometer_widget_option('raised_string') ?? ''); 16 $raisedA = explode(';', $raised_str); 17 19 18 if ($decsep == ','){ 20 19 foreach($raisedA as &$item) { 21 20 $item = floatval(str_replace(',', '.', str_replace('.', '', strval($item)))); 22 21 } 22 unset($item); 23 } else { 24 $raisedA = array_map('floatval', $raisedA); 23 25 } 26 24 27 $raised = array_sum($raisedA); 25 $targetA = explode(';',self::get_thermometer_widget_option('target_string')); 28 29 $target_str = (string)(self::get_thermometer_widget_option('target_string') ?? ''); 30 $targetA = explode(';', $target_str); 31 26 32 if ($decsep == ','){ 27 33 foreach($targetA as &$item) { 28 34 $item = floatval(str_replace(',', '.', str_replace('.', '', strval($item)))); 29 35 } 36 unset($item); 37 } else { 38 $targetA = array_map('floatval', $targetA); 30 39 } 31 40 32 41 $target = floatval(end($targetA)); 42 33 43 $currency = self::get_thermometer_widget_option('currency'); 34 44 $trailing = self::get_thermometer_widget_option('trailing'); -
donation-thermometer/trunk/readme.txt
r3596038 r3653359 5 5 Requires at least: 4.6 6 6 Tested up to: 7.0 7 Stable tag: 2.2. 97 Stable tag: 2.2.10 8 8 Requires PHP: 5.2 9 9 License: GPL3 … … 80 80 81 81 == Changelog == 82 83 = 2.2.10 = 84 * Bug fix on the Dashboard widget. 82 85 83 86 = 2.2.9 =
Note:
See TracChangeset
for help on using the changeset viewer.
![(please configure the [header_logo] section in trac.ini)](/chrome/site/your_project_logo.png)