PluginProbe
Formidable Forms – WordPress Form Builder for Contact Forms, Calculators, Quizzes & More / 5.1
Formidable Forms – WordPress Form Builder for Contact Forms, Calculators, Quizzes & More v5.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 | classes/controllers/FrmHooksController.php +2 -47 6.35.1 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
@@ -178,24 +163,13 @@
178 163 add_action( 'enqueue_block_editor_assets', 'FrmSimpleBlocksController::block_editor_assets' );
179 164
180 165 add_action( 'admin_init', 'FrmUsageController::schedule_send' );
181 166
182 - // Applications Controller.
183 - add_action( 'admin_menu', 'FrmApplicationsController::menu', 14 ); // Use the same priority as styles so Applications appear directly under Styles.
184 - add_action( 'admin_enqueue_scripts', 'FrmApplicationsController::dequeue_scripts', 15 );
185 - add_action( 'wp_ajax_frm_get_applications_data', 'FrmApplicationsController::get_applications_data' );
186 -
187 - // CAPTCHA
188 - add_filter( 'frm_setup_edit_field_vars', 'FrmFieldCaptcha::update_field_name' );
189 -
190 167 FrmSMTPController::load_hooks();
191 168 FrmWelcomeController::load_hooks();
192 169 new FrmPluginSearch();
193 170 }
194 171
195 - /**
196 - * @return void
197 - */
198 172 public static function load_ajax_hooks() {
199 173 add_action( 'wp_ajax_frm_install', 'FrmAppController::ajax_install' );
200 174 add_action( 'wp_ajax_frm_uninstall', 'FrmAppController::uninstall' );
201 175 add_action( 'wp_ajax_frm_deauthorize', 'FrmAppController::deauthorize' );
@@ -226,10 +200,8 @@
226 200 add_action( 'wp_ajax_nopriv_frm_forms_preview', 'FrmFormsController::preview' );
227 201 add_action( 'wp_ajax_frm_forms_trash', 'FrmFormsController::ajax_trash' );
228 202 add_action( 'wp_ajax_frm_install_form', 'FrmFormsController::build_new_form' );
229 203 add_action( 'wp_ajax_frm_build_template', 'FrmFormsController::build_template' );
230 - add_action( 'wp_ajax_frm_create_page_with_shortcode', 'FrmFormsController::create_page_with_shortcode' );
231 - add_action( 'wp_ajax_get_page_dropdown', 'FrmFormsController::get_page_dropdown' );
232 204
233 205 add_action( 'wp_ajax_frm_dismiss_migrator', 'FrmFormMigratorsHelper::dismiss_migrator' );
234 206
235 207 // Inbox.
@@ -244,9 +216,8 @@
244 216 add_action( 'wp_ajax_frmpro_load_css', 'FrmStylesController::load_css' );
245 217 add_action( 'wp_ajax_nopriv_frmpro_load_css', 'FrmStylesController::load_css' );
246 218 add_action( 'wp_ajax_frmpro_css', 'FrmStylesController::load_saved_css' );
247 219 add_action( 'wp_ajax_nopriv_frmpro_css', 'FrmStylesController::load_saved_css' );
248 - add_action( 'wp_ajax_frm_rename_style', 'FrmStylesController::rename_style' );
249 220
250 221 // XML Controller.
251 222 add_action( 'wp_ajax_frm_install_template', 'FrmXMLController::install_template' );
252 223 add_action( 'wp_ajax_frm_entries_csv', 'FrmXMLController::csv' );
@@ -254,16 +225,10 @@
254 225 add_action( 'wp_ajax_frm_export_xml', 'FrmXMLController::export_xml' );
255 226
256 227 // Templates API.
257 228 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 229 }
262 230
263 - /**
264 - * @return void
265 - */
266 231 public static function load_form_hooks() {
267 232 // Fields Controller.
268 233 add_filter( 'frm_field_type', 'FrmFieldsController::change_type' );
269 234 add_action( 'frm_field_input_html', 'FrmFieldsController::input_html' );
@@ -271,25 +236,17 @@
271 236 add_filter( 'frm_field_label_seen', 'FrmFieldsController::check_label' );
272 237
273 238 // Forms Controller.
274 239 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 240
278 241 // Styles Controller.
279 242 add_filter( 'frm_use_important_width', 'FrmStylesController::important_style', 10, 2 );
280 243 }
281 244
282 - /**
283 - * @return void
284 - */
285 245 public static function load_view_hooks() {
286 246 // Hooks go here when a view is loaded.
287 247 }
288 248
289 - /**
290 - * @return void
291 - */
292 249 public static function load_multisite_hooks() {
293 250 add_action( 'wpmu_upgrade_site', 'FrmAppController::network_upgrade_site' );
294 251
295 252 // Drop tables when mu site is deleted.
@@ -297,10 +254,8 @@
297 254 }
298 255
299 256 /**
300 257 * @deprecated 5.0.06 use FrmElementorController::register_elementor_hooks directly.
301 - *
302 - * @return void
303 258 */
304 259 public static function register_elementor_hooks() {
305 260 _deprecated_function( __FUNCTION__, '5.0.06', 'FrmElementorController::register_elementor_hooks' );
306 261 FrmElementorController::register_elementor_hooks();