← All changes
|
classes/controllers/FrmDeactivationFeedbackController.php
+3
-6
6.26
→
trunk
View file →
| @@ -38,13 +38,9 @@ | ||
| 38 | 38 | } |
| 39 | 39 | |
| 40 | 40 | $expired_date = strtotime( $feedback_expired ); |
| 41 | 41 | |
| 42 | - if ( ! $expired_date ) { | |
| 43 | - return true; | |
| 44 | - } | |
| 45 | - | |
| 46 | - return $expired_date < time(); | |
| 42 | + return $expired_date ? $expired_date < time() : true; | |
| 47 | 43 | } |
| 48 | 44 | |
| 49 | 45 | /** |
| 50 | 46 | * Sets feedback expired date. |
| @@ -57,11 +53,12 @@ | ||
| 57 | 53 | if ( empty( $_GET['frm_feedback_submitted'] ) ) { |
| 58 | 54 | return; |
| 59 | 55 | } |
| 60 | 56 | |
| 61 | - if ( ! strpos( $plugin, 'formidable.php' ) && ! strpos( $plugin, 'formidable-pro.php' ) ) { | |
| 57 | + if ( ! str_contains( $plugin, 'formidable.php' ) && ! str_contains( $plugin, 'formidable-pro.php' ) ) { | |
| 62 | 58 | return; |
| 63 | 59 | } |
| 60 | + | |
| 64 | 61 | update_option( 'frm_feedback_expired', gmdate( 'Y-m-d', strtotime( '+ 1 day' ) ) ); |
| 65 | 62 | } |
| 66 | 63 | |
| 67 | 64 | /** |