Changeset 3081467
- Timestamp:
- 05/05/2024 10:37:44 AM (21 months ago)
- Location:
- simple-countdown/trunk
- Files:
-
- 3 edited
-
gpls-wpsctr-simple-countdown-timer.php (modified) (1 diff)
-
includes/Cpts/CountDownTimerCPT.php (modified) (3 diffs)
-
readme.txt (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
simple-countdown/trunk/gpls-wpsctr-simple-countdown-timer.php
r2930088 r3081467 9 9 * Text Domain: simple-countdown 10 10 * Std Name: gpls-wpsctr-simple-countdown-timer 11 * Version: 1.0. 111 * Version: 1.0.2 12 12 * 13 13 * @package GPLS_Wpsctr_Simple_countdown_Timer -
simple-countdown/trunk/includes/Cpts/CountDownTimerCPT.php
r2852583 r3081467 306 306 $target_timezone = $this->adjust_timezone( $timezone_string ); 307 307 308 try { 309 $arrival_time = \DateTime::createFromFormat( 'Y-m-d\TH:i', $target_time, $target_timezone )->getTimestamp(); 310 } catch ( \Exception $e ) { 311 return ''; 308 if ( ! empty( $attrs['datetime'] ) ) { 309 $timestamp = (int) sanitize_text_field( wp_unslash( $attrs['datetime'] ) ); 310 311 if ( $this->is_valid_timestamp( $timestamp ) ) { 312 $arrival_time = $timestamp; 313 } 314 315 } 316 317 if ( ! isset( $arrival_time ) || ! is_numeric( $arrival_time ) || (int) $arrival_time !== $arrival_time ) { 318 try { 319 $arrival_time = \DateTime::createFromFormat( 'Y-m-d\TH:i', $target_time, $target_timezone )->getTimestamp(); 320 } catch ( \Exception $e ) { 321 return ''; 322 } 312 323 } 313 324 314 325 $current_time = $this->get_current_time()->getTimestamp(); 315 326 316 if ( ! is _numeric( $arrival_time ) || (int) $arrival_time !== $arrival_time ) {327 if ( ! isset( $arrival_time ) || ! is_numeric( $arrival_time ) || (int) $arrival_time !== $arrival_time ) { 317 328 return ''; 318 329 } … … 327 338 $timer_hide_division = $this->timer_hide_divisions( $post_id ); 328 339 ?> 329 <div id="<?php echo esc_attr( self::$plugin_info['classes_prefix'] . '-countdown-timer-' . $post_id ); ?>" class=" <?php echo esc_attr( self::$plugin_info['classes_prefix'] . '-countdown-timer-container' ); ?>">340 <div id="<?php echo esc_attr( self::$plugin_info['classes_prefix'] . '-countdown-timer-' . $post_id ); ?>" class="flipdown-size-sm <?php echo esc_attr( self::$plugin_info['classes_prefix'] . '-countdown-timer-container' ); ?>"> 330 341 <div class="<?php echo esc_attr( self::$plugin_info['classes_prefix'] . '-countdown-timer-wrapper' ); ?>"> 331 342 <?php … … 357 368 </div> 358 369 <?php 370 $GLOBALS[ self::$plugin_info['classes_prefix'] . '-countdown-timer-shortcode' ] = true; 359 371 return ob_get_clean(); 372 } 373 374 /** 375 * Is timestamp valid. 376 * 377 * @param int $timestamp 378 * @return boolean 379 */ 380 private function is_valid_timestamp( $timestamp ) { 381 try { 382 return (bool) \DateTime::createFromFormat( 'U', $timestamp ); 383 } catch ( \Exception $e ) { 384 return false; 385 } 360 386 } 361 387 -
simple-countdown/trunk/readme.txt
r2930088 r3081467 1 1 === Simple Countdown Timer === 2 2 Tags: countdown, timer, countdown timer, time tracking 3 Tested up to: 6. 23 Tested up to: 6.5 4 4 Requires at least: 5.3.0 5 5 Requires PHP: 7.0.0 6 Stable Tag: 1.0. 17 Version: 1.0. 16 Stable Tag: 1.0.2 7 Version: 1.0.2 8 8 Contributors: grandplugins 9 9 Author: GrandPlugins … … 38 38 == Check Our other plugins == 39 39 40 [Advanced Captcha](https://grandplugins.com/product/woo-advanced-captcha/?utm_source=simple-countdown) 41 [Woo Advanced Add To Cart](https://grandplugins.com/product/woo-advanced-add-to-cart/?utm_source=simple-countdown) 42 [Woo Advanced Pricing](https://grandplugins.com/product/woo-advanced-pricing/?utm_source=simple-countdown) 40 [Woo instock Notifier](https://grandplugins.com/product/woo-instock-notifier/) 41 42 [Woo Gift Cards](https://grandplugins.com/product/woo-gift-cards/?utm_source=free&utm_medium=gpls-avfstw-avif-support) 43 44 [Woo Restrict Orders](https://grandplugins.com/product/woo-restrict-orders/?utm_source=free&utm_medium=gpls-avfstw-avif-support) 45 46 [Woo Bulk Price & Stock Manager](https://grandplugins.com/product/woo-bulk-price-change/?utm_source=free&utm_medium=gpls-avfstw-avif-support) 47 48 [Woo Variation Sold individually](https://grandplugins.com/product/woo-variation-sold-individually/?utm_source=free&utm_medium=gpls-avfstw-avif-support) 49 50 [Woo Paddle Checkout](https://grandplugins.com/product/woo-paddle-checkout/?utm_source=free&utm_medium=gpls-avfstw-avif-support) 51 52 [Woo Sales notifications](https://grandplugins.com/product/woo-sales-notification/?utm_source=free&utm_medium=gpls-avfstw-avif-support) 53 54 [Woo Real time Cart Tracker](https://grandplugins.com/product/woo-cart-tracker/?utm_source=free&utm_medium=gpls-avfstw-avif-support) 55 56 [Woo Best Sellers](https://grandplugins.com/product/woo-best-seller/?utm_source=free&utm_medium=gpls-avfstw-avif-support) 57 58 [Advanced Captcha](https://grandplugins.com/product/woo-advanced-captcha/?utm_source=free&utm_medium=gpls-avfstw-avif-support) 59 60 [WooCommerce Advanced Bundles](https://grandplugins.com/product/woo-advanced-add-to-cart/?utm_source=free&utm_medium=gpls-avfstw-avif-support) 61 62 [WooCommerce Advanced Pricing - Discounts & Quantity Swatches](https://grandplugins.com/product/woo-advanced-pricing/?utm_source=free&utm_medium=gpls-avfstw-avif-support) 63 64 [Image Sizes Controller](https://wordpress.org/plugins/image-sizes-controller/) 65 43 66 [WooCommerce Cart Limiter](https://wordpress.org/plugins/cart-limiter/) 67 68 [WP Watermark Images](https://wordpress.org/plugins/watermark-images-for-wp-and-woo-grandpluginswp/) 69 70 [Coming Soon Products for WooCommerce](https://wordpress.org/plugins/coming-soon-products-for-woocommerce) 71 72 [WooCommerce Cart and Order Limiter](https://wordpress.org/plugins/cart-limiter/) 73 44 74 [Watermark PDF](https://wordpress.org/plugins/watermark-pdf/) 45 [WP Watermark Images](https://wordpress.org/plugins/watermark-images-for-wp-and-woo-grandpluginswp/) 46 [Coming Soon Products for WooCommerce](https://wordpress.org/plugins/coming-soon-products-for-woocommerce) 75 47 76 [Quick View and Buy Now for WooCommerce](https://wordpress.org/plugins/quick-view-and-buy-now-for-woocommerce/) 77 78 [WooCommerce Maintenance Mode](https://wordpress.org/plugins/ultimate-maintenance-mode-for-woocommerce/) 79 48 80 [Sidebars Gutenberg Blocks](https://wordpress.org/plugins/sidebars-blocks/) 49 [Image Zoom on Hover](https://wordpress.org/plugins/image-block-zoom-on-hover/) 81 50 82 [Large Images Uploader](https://wordpress.org/plugins/large-images-uploader/) 83 51 84 [Maintenance Mode for WooCommerce](https://wordpress.org/plugins/ultimate-maintenance-mode-for-woocommerce/) 85 52 86 [Single Ajax Add to Cart For WooCommerce](https://wordpress.org/plugins/ajax-single-add-to-cart-for-woocommerce/) 87 53 88 [GIF Uploader](https://wordpress.org/plugins/gif-uploader-wp-grandplugins) 89 54 90 [PDF Password Protect](https://wordpress.org/plugins/pdf-password-protect/) 91 55 92 [Paypal Subscriptions](https://wordpress.org/plugins/gpls-paypal-subscriptions/) 93 94 [WP Plugin Creator](https://wpplugincreator.com)
Note: See TracChangeset
for help on using the changeset viewer.