PluginProbe
Formidable Forms – WordPress Form Builder for Contact Forms, Calculators, Quizzes & More / 6.2.1
Formidable Forms – WordPress Form Builder for Contact Forms, Calculators, Quizzes & More v6.2.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 +7 -44 6.56.2.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.5
5 +Version: 6.2.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
@@ -48,9 +48,9 @@
48 48 FrmHooksController::trigger_load_hook();
49 49 }
50 50
51 51 // if __autoload is active, put it on the spl_autoload stack
52 -if ( is_array( spl_autoload_functions() ) && in_array( '__autoload', spl_autoload_functions(), true ) ) {
52 +if ( is_array( spl_autoload_functions() ) && in_array( '__autoload', spl_autoload_functions() ) ) {
53 53 spl_autoload_register( '__autoload' );
54 54 }
55 55
56 56 // Add the autoloader
@@ -75,11 +75,10 @@
75 75 *
76 76 * @return void
77 77 */
78 78 function frm_class_autoloader( $class_name, $filepath ) {
79 - $deprecated = array( 'FrmPointers', 'FrmEDD_SL_Plugin_Updater' );
80 - $is_deprecated = in_array( $class_name, $deprecated, true ) || preg_match( '/^.+Deprecate/', $class_name );
81 - $original_filepath = $filepath;
79 + $deprecated = array( 'FrmEntryFormat', 'FrmPointers', 'FrmEDD_SL_Plugin_Updater' );
80 + $is_deprecated = in_array( $class_name, $deprecated ) || preg_match( '/^.+Deprecate/', $class_name );
82 81
83 82 if ( $is_deprecated ) {
84 83 $filepath .= '/deprecated/';
85 84 } else {
@@ -85,11 +84,11 @@
85 84 } else {
86 85 $filepath .= '/classes/';
87 86 if ( preg_match( '/^.+Helper$/', $class_name ) ) {
88 87 $filepath .= 'helpers/';
89 - } elseif ( preg_match( '/^.+Controller$/', $class_name ) ) {
88 + } else if ( preg_match( '/^.+Controller$/', $class_name ) ) {
90 89 $filepath .= 'controllers/';
91 - } elseif ( preg_match( '/^.+Factory$/', $class_name ) ) {
90 + } else if ( preg_match( '/^.+Factory$/', $class_name ) ) {
92 91 $filepath .= 'factories/';
93 92 } else {
94 93 $filepath .= 'models/';
95 94 if ( strpos( $class_name, 'Field' ) && ! file_exists( $filepath . $class_name . '.php' ) ) {
@@ -97,40 +96,17 @@
97 96 }
98 97 }
99 98 }
100 99
101 - if ( file_exists( $filepath . $class_name . '.php' ) ) {
102 - require $filepath . $class_name . '.php';
103 - return;
104 - }
105 -
106 - if ( ! preg_match( '/^FrmStrpLite.+$/', $class_name ) && ! preg_match( '/^FrmTransLite.+$/', $class_name ) ) {
107 - // Exit early if the class does not match the Stripe Lite prefix.
108 - return;
109 - }
110 -
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 100 $filepath .= $class_name . '.php';
122 101
123 102 if ( file_exists( $filepath ) ) {
124 - require $filepath;
103 + require( $filepath );
125 104 }
126 105 }
127 106
128 107 add_action( 'activate_' . FrmAppHelper::plugin_folder() . '/formidable.php', 'frm_maybe_install' );
129 -
130 108 /**
131 - * This function is triggered when Formidable is activated.
132 - *
133 109 * @return void
134 110 */
135 111 function frm_maybe_install() {
136 112 if ( get_transient( FrmWelcomeController::$option_name ) !== 'no' ) {
@@ -135,18 +111,5 @@
135 111 function frm_maybe_install() {
136 112 if ( get_transient( FrmWelcomeController::$option_name ) !== 'no' ) {
137 113 set_transient( FrmWelcomeController::$option_name, FrmWelcomeController::$menu_slug, 60 );
138 114 }
139 -
140 - FrmAppController::handle_activation();
141 115 }
142 -
143 -register_deactivation_hook(
144 - __FILE__,
145 - function() {
146 - if ( ! class_exists( 'FrmCronController', false ) ) {
147 - require_once __DIR__ . '/classes/controllers/FrmCronController.php';
148 - }
149 -
150 - FrmCronController::remove_crons();
151 - }
152 -);