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 | formidable.php +20 -32 6.26 → trunk 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.26
5 + * Version: 6.35
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
@@ -97,9 +97,9 @@
97 97 $filepath .= 'views/styles/components/';
98 98 } else {
99 99 $filepath .= 'models/';
100 100
101 - if ( strpos( $class_name, 'Field' ) && ! file_exists( $filepath . $class_name . '.php' ) ) {
101 + if ( str_contains( $class_name, 'Field' ) && ! file_exists( $filepath . $class_name . '.php' ) ) {
102 102 $filepath .= 'fields/';
103 103 }
104 104 }
105 105
@@ -107,45 +107,33 @@
107 107 require $filepath . $class_name . '.php';
108 108 return;
109 109 }
110 110
111 + $filepath = $original_filepath;
112 +
111 113 if ( preg_match( '/^FrmStrpLite.+$/', $class_name ) || preg_match( '/^FrmTransLite.+$/', $class_name ) ) {
112 114 // Autoload for /stripe/ folder.
113 - $filepath = $original_filepath . '/stripe/';
114 -
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 - }
122 -
123 - $filepath .= $class_name . '.php';
124 -
125 - if ( file_exists( $filepath ) ) {
126 - require $filepath;
127 - }
128 -
115 + $filepath .= '/stripe/';
116 + } elseif ( preg_match( '/^FrmSquareLite.+$/', $class_name ) ) {
117 + $filepath .= '/square/';
118 + } elseif ( preg_match( '/^FrmPayPalLite.+$/', $class_name ) ) {
119 + $filepath .= '/paypal/';
120 + } else {
129 121 return;
130 122 }
131 123
132 - if ( preg_match( '/^FrmSquareLite.+$/', $class_name ) ) {
133 - $filepath = $original_filepath . '/square/';
124 + if ( preg_match( '/^.+Helper$/', $class_name ) ) {
125 + $filepath .= 'helpers/';
126 + } elseif ( preg_match( '/^.+Controller$/', $class_name ) ) {
127 + $filepath .= 'controllers/';
128 + } else {
129 + $filepath .= 'models/';
130 + }
134 131
135 - if ( preg_match( '/^.+Helper$/', $class_name ) ) {
136 - $filepath .= 'helpers/';
137 - } elseif ( preg_match( '/^.+Controller$/', $class_name ) ) {
138 - $filepath .= 'controllers/';
139 - } else {
140 - $filepath .= 'models/';
141 - }
132 + $filepath .= $class_name . '.php';
142 133
143 - $filepath .= $class_name . '.php';
144 -
145 - if ( file_exists( $filepath ) ) {
146 - require $filepath;
147 - }
134 + if ( file_exists( $filepath ) ) {
135 + require $filepath;
148 136 }
149 137 }
150 138
151 139 add_action( 'activate_' . FrmAppHelper::plugin_folder() . '/formidable.php', 'frm_maybe_install' );