PluginProbe
Formidable Forms – WordPress Form Builder for Contact Forms, Calculators, Quizzes & More / 5.4
Formidable Forms – WordPress Form Builder for Contact Forms, Calculators, Quizzes & More v5.4
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/FrmHooksController.php +2 -40 6.35.4 View file →
@@ -6,12 +6,8 @@
6 6 class FrmHooksController {
7 7
8 8 /**
9 9 * Trigger plugin-wide hook loading
10 - *
11 - * @param string $hooks
12 - *
13 - * @return void
14 10 */
15 11 public static function trigger_load_hook( $hooks = 'load_hooks' ) {
16 12 $controllers = apply_filters( 'frm_load_controllers', array( 'FrmHooksController' ) );
17 13
@@ -48,18 +44,12 @@
48 44 }
49 45
50 46 }
51 47
52 - /**
53 - * @return void
54 - */
55 48 public static function trigger_load_form_hooks() {
56 49 self::trigger_load_hook( 'load_form_hooks' );
57 50 }
58 51
59 - /**
60 - * @return void
61 - */
62 52 public static function load_hooks() {
63 53 add_action( 'rest_api_init', 'FrmAppController::create_rest_routes', 0 );
64 54 add_action( 'plugins_loaded', 'FrmAppController::load_lang' );
65 55 add_filter( 'widget_text', 'do_shortcode' );
@@ -103,15 +93,11 @@
103 93 */
104 94 add_filter( 'frm_keep_name_value_array', '__return_true' );
105 95
106 96 // Elementor.
107 - add_action( 'elementor/widgets/register', 'FrmElementorController::register_elementor_hooks' );
108 - add_filter( 'frm_fields_in_form_builder', 'FrmFormsController::update_form_builder_fields', 10, 2 );
97 + add_action( 'elementor/widgets/widgets_registered', 'FrmElementorController::register_elementor_hooks' );
109 98 }
110 99
111 - /**
112 - * @return void
113 - */
114 100 public static function load_admin_hooks() {
115 101 add_action( 'admin_menu', 'FrmAppController::menu', 1 );
116 102 add_filter( 'admin_body_class', 'FrmAppController::add_admin_class', 999 );
117 103 add_action( 'admin_enqueue_scripts', 'FrmAppController::load_wp_admin_style' );
@@ -123,8 +109,9 @@
123 109
124 110 // Addons Controller.
125 111 add_action( 'admin_menu', 'FrmAddonsController::menu', 100 );
126 112 add_filter( 'pre_set_site_transient_update_plugins', 'FrmAddonsController::check_update' );
113 + add_action( 'frm_page_footer', 'FrmAppHelper::renewal_message' );
127 114
128 115 // Entries Controller.
129 116 add_action( 'admin_menu', 'FrmEntriesController::menu', 12 );
130 117 add_filter( 'set-screen-option', 'FrmEntriesController::save_per_page', 10, 3 );
@@ -166,11 +153,9 @@
166 153 add_action( 'wp_ajax_frm_page_search', 'FrmSettingsController::page_search' );
167 154
168 155 // Styles Controller.
169 156 add_action( 'admin_menu', 'FrmStylesController::menu', 14 );
170 - add_action( 'plugins_loaded', 'FrmStylesController::plugins_loaded' );
171 157 add_action( 'admin_init', 'FrmStylesController::admin_init' );
172 - add_action( 'wp_default_styles', 'FrmStylesController::disable_conflicting_wp_admin_css', 11 ); // Use 11 so it happens after add_action( 'wp_default_styles', 'wp_default_styles' ); where edit.css is added.
173 158
174 159 // XML Controller.
175 160 add_action( 'admin_menu', 'FrmXMLController::menu', 41 );
176 161
@@ -183,19 +168,13 @@
183 168 add_action( 'admin_menu', 'FrmApplicationsController::menu', 14 ); // Use the same priority as styles so Applications appear directly under Styles.
184 169 add_action( 'admin_enqueue_scripts', 'FrmApplicationsController::dequeue_scripts', 15 );
185 170 add_action( 'wp_ajax_frm_get_applications_data', 'FrmApplicationsController::get_applications_data' );
186 171
187 - // CAPTCHA
188 - add_filter( 'frm_setup_edit_field_vars', 'FrmFieldCaptcha::update_field_name' );
189 -
190 172 FrmSMTPController::load_hooks();
191 173 FrmWelcomeController::load_hooks();
192 174 new FrmPluginSearch();
193 175 }
194 176
195 - /**
196 - * @return void
197 - */
198 177 public static function load_ajax_hooks() {
199 178 add_action( 'wp_ajax_frm_install', 'FrmAppController::ajax_install' );
200 179 add_action( 'wp_ajax_frm_uninstall', 'FrmAppController::uninstall' );
201 180 add_action( 'wp_ajax_frm_deauthorize', 'FrmAppController::deauthorize' );
@@ -244,9 +223,8 @@
244 223 add_action( 'wp_ajax_frmpro_load_css', 'FrmStylesController::load_css' );
245 224 add_action( 'wp_ajax_nopriv_frmpro_load_css', 'FrmStylesController::load_css' );
246 225 add_action( 'wp_ajax_frmpro_css', 'FrmStylesController::load_saved_css' );
247 226 add_action( 'wp_ajax_nopriv_frmpro_css', 'FrmStylesController::load_saved_css' );
248 - add_action( 'wp_ajax_frm_rename_style', 'FrmStylesController::rename_style' );
249 227
250 228 // XML Controller.
251 229 add_action( 'wp_ajax_frm_install_template', 'FrmXMLController::install_template' );
252 230 add_action( 'wp_ajax_frm_entries_csv', 'FrmXMLController::csv' );
@@ -254,16 +232,10 @@
254 232 add_action( 'wp_ajax_frm_export_xml', 'FrmXMLController::export_xml' );
255 233
256 234 // Templates API.
257 235 add_action( 'wp_ajax_template_api_signup', 'FrmFormTemplateApi::signup' );
258 -
259 - // Submit with AJAX.
260 - add_action( 'wp_loaded', 'FrmEntriesAJAXSubmitController::ajax_create', 5 ); // Trigger before process_entry.
261 236 }
262 237
263 - /**
264 - * @return void
265 - */
266 238 public static function load_form_hooks() {
267 239 // Fields Controller.
268 240 add_filter( 'frm_field_type', 'FrmFieldsController::change_type' );
269 241 add_action( 'frm_field_input_html', 'FrmFieldsController::input_html' );
@@ -271,25 +243,17 @@
271 243 add_filter( 'frm_field_label_seen', 'FrmFieldsController::check_label' );
272 244
273 245 // Forms Controller.
274 246 add_filter( 'frm_form_classes', 'FrmFormsController::form_classes' );
275 - add_filter( 'frm_submit_button_class', 'FrmFormsController::update_button_classes' );
276 - add_filter( 'frm_back_button_class', 'FrmFormsController::update_button_classes' );
277 247
278 248 // Styles Controller.
279 249 add_filter( 'frm_use_important_width', 'FrmStylesController::important_style', 10, 2 );
280 250 }
281 251
282 - /**
283 - * @return void
284 - */
285 252 public static function load_view_hooks() {
286 253 // Hooks go here when a view is loaded.
287 254 }
288 255
289 - /**
290 - * @return void
291 - */
292 256 public static function load_multisite_hooks() {
293 257 add_action( 'wpmu_upgrade_site', 'FrmAppController::network_upgrade_site' );
294 258
295 259 // Drop tables when mu site is deleted.
@@ -297,10 +261,8 @@
297 261 }
298 262
299 263 /**
300 264 * @deprecated 5.0.06 use FrmElementorController::register_elementor_hooks directly.
301 - *
302 - * @return void
303 265 */
304 266 public static function register_elementor_hooks() {
305 267 _deprecated_function( __FUNCTION__, '5.0.06', 'FrmElementorController::register_elementor_hooks' );
306 268 FrmElementorController::register_elementor_hooks();