PluginProbe
Formidable Forms – WordPress Form Builder for Contact Forms, Calculators, Quizzes & More / trunk
Formidable Forms – WordPress Form Builder for Contact Forms, Calculators, Quizzes & More vtrunk
6.35 6.34 6.33.1 6.33 6.32.1 6.32 6.31 6.25 6.25.1 6.26 6.26.1 6.27 6.28 6.29 6.3 6.3.1 6.3.2 6.30 6.4 6.4.1 6.4.2 6.5 6.5.1 6.5.2 6.5.3 All 141 releases
← All changes | classes/controllers/FrmDeactivationFeedbackController.php +6 -5 6.25.1 → trunk View file →
@@ -2,8 +2,9 @@
2 2 /**
3 3 * Deactivation feedback controller
4 4 *
5 5 * @package Formidable
6 + *
6 7 * @since 6.15
7 8 */
8 9
9 10 if ( ! defined( 'ABSPATH' ) ) {
@@ -30,18 +31,16 @@
30 31 * @return bool
31 32 */
32 33 private static function feedback_is_expired() {
33 34 $feedback_expired = get_option( 'frm_feedback_expired' );
35 +
34 36 if ( ! $feedback_expired ) {
35 37 return true;
36 38 }
37 39
38 40 $expired_date = strtotime( $feedback_expired );
39 - if ( ! $expired_date ) {
40 - return true;
41 - }
42 41
43 - return $expired_date < time();
42 + return $expired_date ? $expired_date < time() : true;
44 43 }
45 44
46 45 /**
47 46 * Sets feedback expired date.
@@ -53,11 +52,13 @@
53 52 public static function set_feedback_expired_date( $plugin ) {
54 53 if ( empty( $_GET['frm_feedback_submitted'] ) ) {
55 54 return;
56 55 }
57 - if ( ! strpos( $plugin, 'formidable.php' ) && ! strpos( $plugin, 'formidable-pro.php' ) ) {
56 +
57 + if ( ! str_contains( $plugin, 'formidable.php' ) && ! str_contains( $plugin, 'formidable-pro.php' ) ) {
58 58 return;
59 59 }
60 +
60 61 update_option( 'frm_feedback_expired', gmdate( 'Y-m-d', strtotime( '+ 1 day' ) ) );
61 62 }
62 63
63 64 /**