| @@ -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.30 | |
| 5 | + * Version: 6.32 | |
| 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 |
| @@ -107,34 +107,20 @@ | ||
| 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 | - | |
| 132 | - if ( ! preg_match( '/^FrmSquareLite.+$/', $class_name ) ) { | |
| 133 | - return; | |
| 134 | - } | |
| 135 | - | |
| 136 | - $filepath = $original_filepath . '/square/'; | |
| 137 | 123 | |
| 138 | 124 | if ( preg_match( '/^.+Helper$/', $class_name ) ) { |
| 139 | 125 | $filepath .= 'helpers/'; |
| 140 | 126 | } elseif ( preg_match( '/^.+Controller$/', $class_name ) ) { |