Changeset 2937808
- Timestamp:
- 07/12/2023 04:03:43 PM (3 years ago)
- Location:
- donation-thermometer/trunk
- Files:
-
- 5 edited
-
donation_therm.php (modified) (2 diffs)
-
includes/therm_settings.php (modified) (1 diff)
-
includes/therm_widget.php (modified) (2 diffs)
-
includes/therm_widget_setup.php (modified) (1 diff)
-
readme.txt (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
donation-thermometer/trunk/donation_therm.php
r2856297 r2937808 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 6 Version: 2.2.1 7 7 Author: Henry Patton 8 8 Text Domain: donation-thermometer … … 266 266 } 267 267 268 if (! (is_numeric($input['decimals']))){ 269 $output['decimals'] = $thermDefaults['decimals']; 268 if ($input['decimals']){ 269 if (! (is_numeric($input['decimals']))){ 270 $output['decimals'] = $thermDefaults['decimals']; 271 } 270 272 } 271 273 -
donation-thermometer/trunk/includes/therm_settings.php
r2856297 r2937808 232 232 $value = (isset(get_option('thermometer_options')[$options['type']])) ? esc_html(get_option('thermometer_options')[$options['type']]) : $options['default']; 233 233 echo '<input id="'.$options['type'].'" type="number" step="1" name="thermometer_options['.$options['type'].']" value="'.sanitize_text_field($value).'" />'; 234 echo ' '.__('number of decimal places', 'donation-thermometer').' (<code>decimals= 2</code>)';234 echo ' '.__('number of decimal places', 'donation-thermometer').' (<code>decimals=0</code>)'; 235 235 echo '</div>'; 236 236 } -
donation-thermometer/trunk/includes/therm_widget.php
r2856297 r2937808 15 15 } 16 16 $decsep = (self::get_thermometer_widget_option('decsep') == ', (comma)') ? ',' : '.'; 17 $decimals = self::get_thermometer_widget_option('decimals');17 $decimals = intval(self::get_thermometer_widget_option('decimals')); 18 18 $raisedA = explode(';',self::get_thermometer_widget_option('raised_string')); 19 19 if ($decsep == ','){ … … 37 37 38 38 if($trailing == 'false'){ 39 39 40 echo esc_html($currency.number_format($target,$decimals,$decsep,$sep)); 40 41 } -
donation-thermometer/trunk/includes/therm_widget_setup.php
r2856297 r2937808 37 37 38 38 public static function get_thermometer_widget_option($option, $default=NULL ) { 39 global $ defaults;40 $opts = wp_parse_args( get_option('thermometer_options' ,$defaults), $defaults);39 global $thermDefaults; 40 $opts = wp_parse_args( get_option('thermometer_options'), $thermDefaults); 41 41 //$opts = self::get_thermometer_widget_options($widget_id); 42 42 -
donation-thermometer/trunk/readme.txt
r2856297 r2937808 4 4 Tags: donate, donation, thermometer, progress, tracker, fundraising, funds, gift, aid, money, charity, non-profit, counter, meter, goal, custom 5 5 Requires at least: 4.6 6 Tested up to: 6. 17 Stable tag: 2.2 6 Tested up to: 6.2.2 7 Stable tag: 2.2.1 8 8 Requires PHP: 5.2 9 9 License: GPL3 … … 76 76 77 77 == Changelog == 78 79 = 2.2.1 = 80 * Fixed some deprecated warnings. 78 81 79 82 = 2.2 =
Note: See TracChangeset
for help on using the changeset viewer.