PluginProbe
Formidable Forms – WordPress Form Builder for Contact Forms, Calculators, Quizzes & More / 6.8.1
Formidable Forms – WordPress Form Builder for Contact Forms, Calculators, Quizzes & More v6.8.1
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 | formidable.php +22 -44 6.256.8.1 View file →
@@ -1,9 +1,9 @@
1 1 <?php
2 2 /**
3 3 * Plugin Name: Formidable Forms
4 4 * Description: Quickly and easily create drag-and-drop forms
5 - * Version: 6.25
5 + * Version: 6.8.1
6 6 * Plugin URI: https://formidableforms.com/
7 7 * Author URI: https://formidableforms.com/
8 8 * Author: Strategy11 Form Builder Team
9 9 * Text Domain: formidable
@@ -41,11 +41,11 @@
41 41 'pro_is_authorized' => false,
42 42 );
43 43
44 44 // For reverse compatibility. Load Pro if it's still nested.
45 - $frm_path = __DIR__;
45 + $frm_path = dirname( __FILE__ );
46 46 if ( file_exists( $frm_path . '/pro/formidable-pro.php' ) ) {
47 - include $frm_path . '/pro/formidable-pro.php';
47 + include( $frm_path . '/pro/formidable-pro.php' );
48 48 }
49 49
50 50 FrmHooksController::trigger_load_hook();
51 51 }
@@ -66,9 +66,9 @@
66 66 if ( ! preg_match( '/^Frm.+$/', $class_name ) || preg_match( '/^FrmPro.+$/', $class_name ) ) {
67 67 return;
68 68 }
69 69
70 - frm_class_autoloader( $class_name, __DIR__ );
70 + frm_class_autoloader( $class_name, dirname( __FILE__ ) );
71 71 }
72 72
73 73 /**
74 74 * Autoload the Formidable and Pro classes
@@ -77,9 +77,9 @@
77 77 *
78 78 * @return void
79 79 */
80 80 function frm_class_autoloader( $class_name, $filepath ) {
81 - $deprecated = array( 'FrmEDD_SL_Plugin_Updater' );
81 + $deprecated = array( 'FrmPointers', 'FrmEDD_SL_Plugin_Updater', 'FrmWelcomeController' );
82 82 $is_deprecated = in_array( $class_name, $deprecated, true ) || preg_match( '/^.+Deprecate/', $class_name );
83 83 $original_filepath = $filepath;
84 84
85 85 if ( $is_deprecated ) {
@@ -91,10 +91,8 @@
91 91 } elseif ( preg_match( '/^.+Controller$/', $class_name ) ) {
92 92 $filepath .= 'controllers/';
93 93 } elseif ( preg_match( '/^.+Factory$/', $class_name ) ) {
94 94 $filepath .= 'factories/';
95 - } elseif ( preg_match( '/^.+StyleComponent$/', $class_name ) ) {
96 - $filepath .= 'views/styles/components/';
97 95 } else {
98 96 $filepath .= 'models/';
99 97 if ( strpos( $class_name, 'Field' ) && ! file_exists( $filepath . $class_name . '.php' ) ) {
100 98 $filepath .= 'fields/';
@@ -106,43 +104,27 @@
106 104 require $filepath . $class_name . '.php';
107 105 return;
108 106 }
109 107
110 - if ( preg_match( '/^FrmStrpLite.+$/', $class_name ) || preg_match( '/^FrmTransLite.+$/', $class_name ) ) {
111 - // Autoload for /stripe/ folder.
112 - $filepath = $original_filepath . '/stripe/';
113 - if ( preg_match( '/^.+Helper$/', $class_name ) ) {
114 - $filepath .= 'helpers/';
115 - } elseif ( preg_match( '/^.+Controller$/', $class_name ) ) {
116 - $filepath .= 'controllers/';
117 - } else {
118 - $filepath .= 'models/';
119 - }
120 -
121 - $filepath .= $class_name . '.php';
122 -
123 - if ( file_exists( $filepath ) ) {
124 - require $filepath;
125 - }
126 -
108 + if ( ! preg_match( '/^FrmStrpLite.+$/', $class_name ) && ! preg_match( '/^FrmTransLite.+$/', $class_name ) ) {
109 + // Exit early if the class does not match the Stripe Lite prefix.
127 110 return;
128 111 }
129 112
130 - if ( preg_match( '/^FrmSquareLite.+$/', $class_name ) ) {
131 - $filepath = $original_filepath . '/square/';
132 - if ( preg_match( '/^.+Helper$/', $class_name ) ) {
133 - $filepath .= 'helpers/';
134 - } elseif ( preg_match( '/^.+Controller$/', $class_name ) ) {
135 - $filepath .= 'controllers/';
136 - } else {
137 - $filepath .= 'models/';
138 - }
113 + // Autoload for /stripe/ folder.
114 + $filepath = $original_filepath . '/stripe/';
115 + if ( preg_match( '/^.+Helper$/', $class_name ) ) {
116 + $filepath .= 'helpers/';
117 + } elseif ( preg_match( '/^.+Controller$/', $class_name ) ) {
118 + $filepath .= 'controllers/';
119 + } else {
120 + $filepath .= 'models/';
121 + }
139 122
140 - $filepath .= $class_name . '.php';
123 + $filepath .= $class_name . '.php';
141 124
142 - if ( file_exists( $filepath ) ) {
143 - require $filepath;
144 - }
125 + if ( file_exists( $filepath ) ) {
126 + require $filepath;
145 127 }
146 128 }
147 129
148 130 add_action( 'activate_' . FrmAppHelper::plugin_folder() . '/formidable.php', 'frm_maybe_install' );
@@ -152,14 +134,10 @@
152 134 *
153 135 * @return void
154 136 */
155 137 function frm_maybe_install() {
156 - if ( get_transient( FrmOnboardingWizardController::TRANSIENT_NAME ) !== 'no' ) {
157 - set_transient(
158 - FrmOnboardingWizardController::TRANSIENT_NAME,
159 - FrmOnboardingWizardController::TRANSIENT_VALUE,
160 - 60
161 - );
138 + if ( get_transient( FrmDashboardController::REDIRECT_META_NAME ) !== 'no' ) {
139 + set_transient( FrmDashboardController::REDIRECT_META_NAME, FrmDashboardController::PAGE_SLUG, 60 );
162 140 }
163 141
164 142 FrmAppController::handle_activation();
165 143 }
@@ -165,9 +143,9 @@
165 143 }
166 144
167 145 register_deactivation_hook(
168 146 __FILE__,
169 - function () {
147 + function() {
170 148 if ( ! class_exists( 'FrmCronController', false ) ) {
171 149 require_once __DIR__ . '/classes/controllers/FrmCronController.php';
172 150 }
173 151