PluginProbe ʕ •ᴥ•ʔ
Everest Forms – Contact Form, Payment Form, Quiz, Survey & Custom Form Builder with AI / 2.0.3
Everest Forms – Contact Form, Payment Form, Quiz, Survey & Custom Form Builder with AI v2.0.3
3.5.2 3.5.1 3.5.0 3.4.8 3.4.7 3.4.6 1.1.0 1.1.1 1.1.2 1.1.3 1.1.4 1.1.5 1.1.5.1 1.1.6 1.1.7 1.1.8 1.1.9 1.2.0 1.2.1 1.2.2 1.2.3 1.2.4 1.3.0 1.3.1 1.3.2 1.3.3 1.3.4 1.4.0 1.4.1 1.4.2 1.4.3 1.4.4 1.4.5 1.4.6 1.4.7 1.4.8 1.4.9 1.5.0 1.5.1 1.5.10 1.5.2 1.5.3 1.5.4 1.5.5 1.5.6 1.5.7 1.5.8 1.5.9 1.6.0 1.6.1 1.6.2 1.6.3 1.6.4 1.6.5 1.6.6 1.6.6.1 1.6.7 1.7.0 1.7.0.1 1.7.0.2 1.7.0.3 1.7.1 1.7.2 1.7.2.1 1.7.2.2 1.7.3 1.7.4 1.7.5 1.7.5.1 1.7.5.2 1.7.6 1.7.7 1.7.7.1 1.7.7.2 1.7.8 1.7.9 1.8.0 1.8.0.1 1.8.1 1.8.2 1.8.2.1 1.8.2.2 1.8.2.3 1.8.3 1.8.4 1.8.5 1.8.6 1.8.7 1.8.8 1.8.9 1.9.0 1.9.0.1 1.9.1 1.9.2 1.9.3 1.9.4 1.9.4.1 1.9.5 1.9.6 1.9.7 1.9.8 1.9.9 2.0.0 2.0.0.1 2.0.1 2.0.2 2.0.3 2.0.3.1 2.0.4 2.0.4.1 2.0.5 2.0.6 2.0.7 2.0.8 2.0.8.1 2.0.9 3.0.0 3.0.0.1 3.0.1 3.0.2 3.0.3 3.0.3.1 3.0.4 3.0.4.1 3.0.4.2 3.0.5 3.0.5.1 3.0.5.2 3.0.6 3.0.6.1 3.0.7.1 3.0.8 3.0.8.1 3.0.9 3.0.9.1 3.0.9.2 3.0.9.3 3.0.9.4 3.0.9.5 3.1.0 3.1.1 3.1.2 3.2.0 3.2.1 3.2.2 3.2.3 3.2.4 3.2.5 3.2.6 3.3.0 3.4.0 3.4.1 3.4.2 3.4.2.1 3.4.3 3.4.4 3.4.5 trunk 1.0 1.0.1 1.0.2 1.0.3
everest-forms / includes / class-evf-deprecated-filter-hooks.php
everest-forms / includes Last commit date
abstracts 2 years ago admin 2 years ago elementor 4 years ago export 3 years ago fields 2 years ago interfaces 8 years ago libraries 2 years ago log-handlers 4 years ago shortcodes 2 years ago stats 3 years ago templates 5 years ago class-everest-forms.php 2 years ago class-evf-ajax.php 2 years ago class-evf-autoloader.php 7 years ago class-evf-background-updater.php 7 years ago class-evf-cache-helper.php 6 years ago class-evf-cron.php 3 years ago class-evf-deprecated-action-hooks.php 6 years ago class-evf-deprecated-filter-hooks.php 5 years ago class-evf-emails.php 2 years ago class-evf-fields.php 2 years ago class-evf-form-block.php 4 years ago class-evf-form-handler.php 3 years ago class-evf-form-task.php 2 years ago class-evf-forms-features.php 2 years ago class-evf-frontend-scripts.php 2 years ago class-evf-install.php 2 years ago class-evf-integrations.php 7 years ago class-evf-log-levels.php 8 years ago class-evf-logger.php 5 years ago class-evf-post-types.php 5 years ago class-evf-privacy.php 6 years ago class-evf-session-handler.php 7 years ago class-evf-shortcodes.php 4 years ago class-evf-smart-tags.php 2 years ago class-evf-template-loader.php 2 years ago class-evf-validation.php 6 years ago evf-conditional-functions.php 6 years ago evf-core-functions.php 2 years ago evf-deprecated-functions.php 6 years ago evf-entry-functions.php 3 years ago evf-formatting-functions.php 4 years ago evf-notice-functions.php 4 years ago evf-template-functions.php 4 years ago evf-template-hooks.php 7 years ago evf-update-functions.php 5 years ago
class-evf-deprecated-filter-hooks.php
97 lines
1 <?php
2 /**
3 * Deprecated filter hooks
4 *
5 * @package EverestForms\Abstracts
6 * @since 1.2.0
7 */
8
9 defined( 'ABSPATH' ) || exit;
10
11 /**
12 * Handles deprecation notices and triggering of legacy filter hooks.
13 */
14 class EVF_Deprecated_Filter_Hooks extends EVF_Deprecated_Hooks {
15
16 /**
17 * Array of deprecated hooks we need to handle. Format of 'new' => 'old'.
18 *
19 * @var array
20 */
21 protected $deprecated_hooks = array(
22 'everest_forms_fields' => 'everest_forms_load_fields',
23 'everest_forms_show_media_button' => 'evf_display_media_button',
24 'everest_forms_show_admin_bar_menus' => 'everest_forms_show_admin_bar',
25 'everest_forms_builder_fields_groups' => 'everest_forms_builder_fields_buttons',
26 'everest_forms_field_data' => 'evf_field_data',
27 'everest_forms_field_properties' => 'evf_field_properties',
28 'everest_forms_field_properties_{field_type}' => 'evf_field_properties_{field_type}',
29 'everest_forms_field_submit' => 'evf_field_submit',
30 'everest_forms_field_required_label' => 'evf_field_required_label',
31 'everest_forms_frontend_load' => 'evf_frontend_load',
32 'everest_forms_frontend_form_action' => 'evf_frontend_form_action',
33 'everest_forms_process_smart_tags' => 'evf_process_smart_tags',
34 'everest_forms_recaptcha_disabled' => 'everest_forms_logged_in_user_recaptcha_disabled',
35 'everest_forms_welcome_cap' => 'evf_welcome_cap',
36 );
37
38 /**
39 * Array of versions on each hook has been deprecated.
40 *
41 * @var array
42 */
43 protected $deprecated_version = array(
44 'everest_forms_load_fields' => '1.2.0',
45 'evf_display_media_button' => '1.2.0',
46 'everest_forms_show_admin_bar' => '1.2.0',
47 'everest_forms_builder_fields_buttons' => '1.2.0',
48 'evf_field_data' => '1.3.0',
49 'evf_field_properties' => '1.3.0',
50 'evf_field_properties_{field_type}' => '1.3.0',
51 'evf_field_submit' => '1.3.2',
52 'evf_field_required_label' => '1.3.2',
53 'evf_frontend_load' => '1.3.2',
54 'evf_frontend_form_action' => '1.3.2',
55 'evf_process_smart_tags' => '1.4.2',
56 'everest_forms_logged_in_user_recaptcha_disabled' => '1.7.0.1',
57 'evf_welcome_cap' => '1.7.5',
58 );
59
60 /**
61 * Hook into the new hook so we can handle deprecated hooks once fired.
62 *
63 * @param string $hook_name Hook name.
64 */
65 public function hook_in( $hook_name ) {
66 add_filter( $hook_name, array( $this, 'maybe_handle_deprecated_hook' ), -1000, 8 );
67 }
68
69 /**
70 * If the old hook is in-use, trigger it.
71 *
72 * @param string $new_hook New hook name.
73 * @param string $old_hook Old hook name.
74 * @param array $new_callback_args New callback args.
75 * @param mixed $return_value Returned value.
76 * @return mixed
77 */
78 public function handle_deprecated_hook( $new_hook, $old_hook, $new_callback_args, $return_value ) {
79 if ( has_filter( $old_hook ) ) {
80 $this->display_notice( $old_hook, $new_hook );
81 $return_value = $this->trigger_hook( $old_hook, $new_callback_args );
82 }
83 return $return_value;
84 }
85
86 /**
87 * Fire off a legacy hook with it's args.
88 *
89 * @param string $old_hook Old hook name.
90 * @param array $new_callback_args New callback args.
91 * @return mixed
92 */
93 protected function trigger_hook( $old_hook, $new_callback_args ) {
94 return apply_filters_ref_array( $old_hook, $new_callback_args );
95 }
96 }
97