PluginProbe ʕ •ᴥ•ʔ
Everest Forms – Contact Form, Payment Form, Quiz, Survey & Custom Form Builder with AI / 2.0.0
Everest Forms – Contact Form, Payment Form, Quiz, Survey & Custom Form Builder with AI v2.0.0
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 / admin / class-evf-admin-assets.php
everest-forms / includes / admin Last commit date
builder 3 years ago plugin-updates 8 years ago settings 3 years ago views 3 years ago class-evf-admin-addons.php 4 years ago class-evf-admin-assets.php 3 years ago class-evf-admin-builder.php 7 years ago class-evf-admin-deactivation-feedback.php 3 years ago class-evf-admin-editor.php 4 years ago class-evf-admin-entries-table-list.php 3 years ago class-evf-admin-entries.php 4 years ago class-evf-admin-form-templates.php 3 years ago class-evf-admin-forms-table-list.php 3 years ago class-evf-admin-forms.php 3 years ago class-evf-admin-import-export.php 4 years ago class-evf-admin-menus.php 3 years ago class-evf-admin-notices.php 3 years ago class-evf-admin-settings.php 3 years ago class-evf-admin-tools.php 4 years ago class-evf-admin-welcome.php 5 years ago class-evf-admin.php 3 years ago evf-admin-functions.php 3 years ago
class-evf-admin-assets.php
305 lines
1 <?php
2 /**
3 * Load assets
4 *
5 * @package EverestForms/Admin
6 * @version 1.0.0
7 */
8
9 defined( 'ABSPATH' ) || exit;
10
11 if ( class_exists( 'EVF_Admin_Assets', false ) ) {
12 return new EVF_Admin_Assets();
13 }
14
15 /**
16 * EVF_Admin_Assets Class.
17 */
18 class EVF_Admin_Assets {
19
20 /**
21 * Hook in tabs.
22 */
23 public function __construct() {
24 add_action( 'admin_enqueue_scripts', array( $this, 'admin_styles' ) );
25 add_action( 'admin_enqueue_scripts', array( $this, 'admin_scripts' ) );
26 }
27
28 /**
29 * Enqueue styles.
30 */
31 public function admin_styles() {
32 $screen = get_current_screen();
33 $screen_id = $screen ? $screen->id : '';
34
35 // Register admin styles.
36 wp_register_style( 'everest-forms-admin', evf()->plugin_url() . '/assets/css/admin.css', array(), EVF_VERSION );
37 wp_register_style( 'everest-forms-admin-menu', evf()->plugin_url() . '/assets/css/menu.css', array(), EVF_VERSION );
38 wp_register_style( 'jquery-ui-style', evf()->plugin_url() . '/assets/css/jquery-ui/jquery-ui.min.css', array(), EVF_VERSION );
39 wp_register_style( 'jquery-confirm', evf()->plugin_url() . '/assets/css/jquery-confirm/jquery-confirm.min.css', array(), '3.3.0' );
40 wp_register_style( 'perfect-scrollbar', evf()->plugin_url() . '/assets/css/perfect-scrollbar/perfect-scrollbar.css', array(), '1.4.0' );
41 wp_register_style( 'flatpickr', evf()->plugin_url() . '/assets/css/flatpickr.css', array(), EVF_VERSION );
42
43 // Add RTL support for admin styles.
44 wp_style_add_data( 'everest-forms-admin', 'rtl', 'replace' );
45 wp_style_add_data( 'everest-forms-admin-menu', 'rtl', 'replace' );
46
47 // Sitewide menu CSS.
48 wp_enqueue_style( 'everest-forms-admin-menu' );
49
50 // Admin styles for EVF pages only.
51 if ( in_array( $screen_id, evf_get_screen_ids(), true ) ) {
52 wp_enqueue_style( 'everest-forms-admin' );
53 wp_enqueue_style( 'jquery-confirm' );
54 wp_enqueue_style( 'jquery-ui-style' );
55 wp_enqueue_style( 'wp-color-picker' );
56 wp_enqueue_style( 'flatpickr' );
57
58 if ( 'everest-forms_page_evf-tools' !== $screen_id ) {
59 wp_enqueue_style( 'perfect-scrollbar' );
60 }
61 }
62 }
63
64 /**
65 * Enqueue scripts.
66 */
67 public function admin_scripts() {
68 global $post;
69
70 $screen = get_current_screen();
71 $screen_id = $screen ? $screen->id : '';
72 $suffix = defined( 'SCRIPT_DEBUG' ) && SCRIPT_DEBUG ? '' : '.min';
73
74 // Register scripts.
75 wp_register_script( 'everest-forms-admin', evf()->plugin_url() . '/assets/js/admin/admin' . $suffix . '.js', array( 'jquery', 'jquery-blockui', 'jquery-ui-sortable', 'jquery-ui-widget', 'jquery-ui-core', 'tooltipster', 'wp-color-picker', 'perfect-scrollbar' ), EVF_VERSION, true );
76 wp_register_script( 'everest-forms-extensions', evf()->plugin_url() . '/assets/js/admin/extensions' . $suffix . '.js', array( 'jquery', 'updates', 'wp-i18n' ), EVF_VERSION, true );
77 wp_register_script( 'everest-forms-email-admin', evf()->plugin_url() . '/assets/js/admin/evf-admin-email' . $suffix . '.js', array( 'jquery', 'jquery-blockui', 'jquery-ui-sortable', 'jquery-ui-widget', 'jquery-ui-core', 'tooltipster', 'wp-color-picker', 'perfect-scrollbar' ), EVF_VERSION, true );
78 wp_register_script( 'everest-forms-editor', evf()->plugin_url() . '/assets/js/admin/editor' . $suffix . '.js', array( 'jquery' ), EVF_VERSION, true );
79 wp_register_script( 'jquery-blockui', evf()->plugin_url() . '/assets/js/jquery-blockui/jquery.blockUI' . $suffix . '.js', array( 'jquery' ), '2.70', true );
80 wp_register_script( 'jquery-confirm', evf()->plugin_url() . '/assets/js/jquery-confirm/jquery-confirm' . $suffix . '.js', array( 'jquery' ), '3.3.0', true );
81 wp_register_script( 'jquery-tiptip', evf()->plugin_url() . '/assets/js/jquery-tiptip/jquery.tipTip' . $suffix . '.js', array( 'jquery' ), EVF_VERSION, true ); // @deprecated
82 wp_register_script( 'tooltipster', evf()->plugin_url() . '/assets/js/tooltipster/tooltipster.bundle' . $suffix . '.js', array( 'jquery' ), '4.6.2', true );
83 wp_register_script( 'perfect-scrollbar', evf()->plugin_url() . '/assets/js/perfect-scrollbar/perfect-scrollbar' . $suffix . '.js', array( 'jquery' ), '1.5.0', true );
84 wp_register_script( 'evf-clipboard', evf()->plugin_url() . '/assets/js/admin/evf-clipboard' . $suffix . '.js', array( 'jquery' ), EVF_VERSION, true );
85 wp_register_script( 'selectWoo', evf()->plugin_url() . '/assets/js/selectWoo/selectWoo.full' . $suffix . '.js', array( 'jquery' ), '1.0.8', true );
86 wp_register_script( 'evf-enhanced-select', evf()->plugin_url() . '/assets/js/admin/evf-enhanced-select' . $suffix . '.js', array( 'jquery', 'selectWoo' ), EVF_VERSION, true );
87 wp_register_script( 'evf-template-controller', evf()->plugin_url() . '/assets/js/admin/form-template-controller' . $suffix . '.js', array( 'jquery' ), EVF_VERSION, true );
88 wp_register_script( 'flatpickr', evf()->plugin_url() . '/assets/js/flatpickr/flatpickr' . $suffix . '.js', array( 'jquery' ), '4.6.3', true );
89 wp_register_script( 'evf-file-uploader', evf()->plugin_url() . '/assets/js/admin/evf-file-uploader' . $suffix . '.js', array(), EVF_VERSION, true );
90 wp_localize_script(
91 'evf-file-uploader',
92 'evf_file_uploader',
93 array(
94 'upload_file' => __( 'Upload Image', 'everest-forms' ),
95 )
96 );
97 wp_localize_script(
98 'evf-template-controller',
99 'evf_templates',
100 array(
101 'evf_template_all' => EVF_Admin_Form_Templates::get_template_data(),
102 'i18n_get_started' => esc_html__( 'Get Started', 'everest-forms' ),
103 'i18n_get_preview' => esc_html__( 'Preview', 'everest-forms' ),
104 'i18n_pro_feature' => esc_html__( 'Pro', 'everest-forms' ),
105 'template_refresh' => esc_html__( 'Updating Templates', 'everest-forms' ),
106 'evf_plugin_url' => esc_url( evf()->plugin_url() ),
107 )
108 );
109 wp_localize_script(
110 'evf-enhanced-select',
111 'evf_enhanced_select_params',
112 array(
113 'i18n_no_matches' => _x( 'No matches found', 'enhanced select', 'everest-forms' ),
114 'i18n_ajax_error' => _x( 'Loading failed', 'enhanced select', 'everest-forms' ),
115 'i18n_input_too_short_1' => _x( 'Please enter 1 or more characters', 'enhanced select', 'everest-forms' ),
116 'i18n_input_too_short_n' => _x( 'Please enter %qty% or more characters', 'enhanced select', 'everest-forms' ),
117 'i18n_input_too_long_1' => _x( 'Please delete 1 character', 'enhanced select', 'everest-forms' ),
118 'i18n_input_too_long_n' => _x( 'Please delete %qty% characters', 'enhanced select', 'everest-forms' ),
119 'i18n_selection_too_long_1' => _x( 'You can only select 1 item', 'enhanced select', 'everest-forms' ),
120 'i18n_selection_too_long_n' => _x( 'You can only select %qty% items', 'enhanced select', 'everest-forms' ),
121 'i18n_load_more' => _x( 'Loading more results&hellip;', 'enhanced select', 'everest-forms' ),
122 'i18n_searching' => _x( 'Searching&hellip;', 'enhanced select', 'everest-forms' ),
123 'i18n_select_all' => _x( 'Select All', 'enhanced select', 'everest-forms' ),
124 'i18n_unselect_all' => _x( 'Unselect All', 'enhanced select', 'everest-forms' ),
125 )
126 );
127 wp_register_script( 'evf-form-builder', evf()->plugin_url() . '/assets/js/admin/form-builder' . $suffix . '.js', array( 'jquery', 'jquery-blockui', 'tooltipster', 'jquery-ui-sortable', 'jquery-ui-widget', 'jquery-ui-core', 'jquery-ui-tabs', 'jquery-ui-draggable', 'jquery-ui-droppable', 'jquery-ui-datepicker', 'jquery-confirm', 'evf-clipboard', 'flatpickr' ), EVF_VERSION, true );
128 wp_localize_script(
129 'evf-form-builder',
130 'evf_data',
131 apply_filters(
132 'everest_forms_builder_strings',
133 array(
134 'post_id' => isset( $post->ID ) ? $post->ID : '',
135 'ajax_url' => admin_url( 'admin-ajax.php' ),
136 'tab' => isset( $_GET['tab'] ) ? sanitize_text_field( wp_unslash( $_GET['tab'] ) ) : '', // phpcs:ignore WordPress.Security.NonceVerification.
137 'evf_field_drop_nonce' => wp_create_nonce( 'everest_forms_field_drop' ),
138 'evf_add_row_nonce' => wp_create_nonce( 'everest_forms_add_row' ),
139 'evf_save_form' => wp_create_nonce( 'everest_forms_save_form' ),
140 'evf_get_next_id' => wp_create_nonce( 'everest_forms_get_next_id' ),
141 'evf_enabled_form' => wp_create_nonce( 'everest_forms_enabled_form' ),
142 'form_id' => isset( $_GET['form_id'] ) ? absint( $_GET['form_id'] ) : 0, // phpcs:ignore WordPress.Security.NonceVerification
143 'field' => esc_html__( 'field', 'everest-forms' ),
144 'i18n_ok' => esc_html__( 'OK', 'everest-forms' ),
145 'i18n_installing' => esc_html__( 'Installing', 'everest-forms' ),
146 'i18n_activating' => esc_html__( 'Activating', 'everest-forms' ),
147 'i18n_install_activate' => esc_html__( 'Install & Activate', 'everest-forms' ),
148 'i18n_install_only' => esc_html__( 'Activate Plugins', 'everest-forms' ),
149 'i18n_copy' => esc_html__( '(copy)', 'everest-forms' ),
150 'i18n_close' => esc_html__( 'Close', 'everest-forms' ),
151 'i18n_cancel' => esc_html__( 'Cancel', 'everest-forms' ),
152 'i18n_row_locked' => esc_html__( 'Row Locked', 'everest-forms' ),
153 'i18n_row_locked_msg' => esc_html__( 'Single row cannot be deleted.', 'everest-forms' ),
154 'i18n_field_locked' => esc_html__( 'Field Locked', 'everest-forms' ),
155 'i18n_field_locked_msg' => esc_html__( 'This field cannot be deleted or duplicated.', 'everest-forms' ),
156 'i18n_row_locked_msg' => esc_html__( 'This row cannot be deleted or duplicated.', 'everest-forms' ),
157 'i18n_field_error_choice' => esc_html__( 'This item must contain at least one choice.', 'everest-forms' ),
158 'i18n_delete_row_confirm' => esc_html__( 'Are you sure you want to delete this row?', 'everest-forms' ),
159 'i18n_delete_field_confirm' => esc_html__( 'Are you sure you want to delete this field?', 'everest-forms' ),
160 'i18n_duplicate_field_confirm' => esc_html__( 'Are you sure you want to duplicate this field?', 'everest-forms' ),
161 'i18n_duplicate_row_confirm' => esc_html__( 'Are you sure you want to duplicate this row?', 'everest-forms' ),
162 'i18n_email_disable_message' => esc_html__( 'Turn on Email settings to manage your email notification.', 'everest-forms' ),
163 'i18n_upload_image_title' => esc_html__( 'Choose an image', 'everest-forms' ),
164 'i18n_upload_image_button' => esc_html__( 'Use Image', 'everest-forms' ),
165 'i18n_upload_image_remove' => esc_html__( 'Remove Image', 'everest-forms' ),
166 'i18n_field_title_empty' => esc_html__( 'Empty Form Name', 'everest-forms' ),
167 'i18n_shortcut_key_title' => esc_html__( 'keyboard Shortcut Keys', 'everest-forms' ),
168 'i18n_shortcut_keys' => array(
169 'Ctrl+S' => esc_html__( 'Save Builder', 'everest-forms' ),
170 'Ctrl+W' => esc_html__( 'Close Builder', 'everest-forms' ),
171 'Ctrl+P' => esc_html__( 'Preview Form', 'everest-forms' ),
172 'Ctrl+E' => esc_html__( 'Go to Entries', 'everest-forms' ),
173 'Ctrl+H' => esc_html__( 'Open Help', 'everest-forms' ),
174 ),
175 'i18n_field_title_payload' => esc_html__( 'Form name can\'t be empty.', 'everest-forms' ),
176 'email_fields' => evf_get_all_email_fields_by_form_id( isset( $_GET['form_id'] ) ? absint( $_GET['form_id'] ) : 0 ), // phpcs:ignore WordPress.Security.NonceVerification
177 'all_fields' => evf_get_all_form_fields_by_form_id( isset( $_GET['form_id'] ) ? absint( $_GET['form_id'] ) : 0 ), // phpcs:ignore WordPress.Security.NonceVerification
178 'smart_tags_other' => evf()->smart_tags->other_smart_tags(),
179 'entries_url' => ! empty( $_GET['form_id'] ) ? esc_url( admin_url( 'admin.php?page=evf-entries&amp;form_id=' . absint( $_GET['form_id'] ) ) ) : '', // phpcs:ignore WordPress.Security.NonceVerification
180 'preview_url' => ! empty( $_GET['form_id'] ) ? esc_url( // phpcs:ignore WordPress.Security.NonceVerification
181 add_query_arg(
182 array(
183 'form_id' => absint( $_GET['form_id'] ), // phpcs:ignore WordPress.Security.NonceVerification
184 'evf_preview' => 'true',
185 ),
186 home_url()
187 )
188 ) : '',
189 )
190 )
191 );
192
193 // Builder upgrade.
194 wp_register_script( 'evf-upgrade', evf()->plugin_url() . '/assets/js/admin/upgrade.js', array( 'jquery', 'jquery-confirm' ), EVF_VERSION, false );
195 wp_localize_script(
196 'evf-upgrade',
197 'evf_upgrade',
198 array(
199 'upgrade_title' => esc_html__( 'is a PRO Feature', 'everest-forms' ),
200 'upgrade_message' => esc_html__( 'We\'re sorry, the %name% is not available on your plan.<br>Please upgrade to the PRO plan to unlock all these awesome features.', 'everest-forms' ),
201 'upgrade_button' => esc_html__( 'Upgrade to PRO', 'everest-forms' ),
202 'upgrade_url' => apply_filters( 'everest_forms_upgrade_url', 'https://wpeverest.com/wordpress-plugins/everest-forms/pricing/?utm_source=premium-fields&utm_medium=modal-button&utm_campaign=evf-upgrade-to-pro' ),
203 'enable_stripe_title' => esc_html__( 'Please enable Stripe', 'everest-forms' ),
204 'enable_stripe_message' => esc_html__( 'Enable Stripe Payment gateway in payments section to use this field.', 'everest-forms' ),
205 )
206 );
207
208 // EverestForms admin pages.
209 if ( in_array( $screen_id, evf_get_screen_ids(), true ) ) {
210 wp_enqueue_script( 'everest-forms-admin' );
211 wp_enqueue_script( 'everest-forms-email-admin' );
212 wp_enqueue_script( 'evf-enhanced-select' );
213 wp_enqueue_script( 'jquery-ui-sortable' );
214 wp_enqueue_script( 'jquery-ui-autocomplete' );
215
216 wp_localize_script(
217 'everest-forms-email-admin',
218 'evf_email_params',
219 array(
220 'i18n_email_connection' => esc_html__( 'Enter a Email nickname', 'everest-forms' ),
221 'i18n_email_placeholder' => esc_html__( 'Eg: Support Email', 'everest-forms' ),
222 'i18n_email_error_name' => esc_html__( 'You must provide a Email nickname', 'everest-forms' ),
223 'i18n_email_ok' => esc_html__( 'OK', 'everest-forms' ),
224 'ajax_email_nonce' => wp_create_nonce( 'process-ajax-nonce' ),
225 'ajax_url' => admin_url( 'admin-ajax.php', 'relative' ),
226 'i18n_email_cancel' => esc_html__( 'Cancel', 'everest-forms' ),
227 'i18n_default_address' => get_option( 'admin_email' ),
228 'from_name' => get_bloginfo( 'name', 'display' ),
229 'email_subject' => esc_html__( 'New Form Entry', 'everest-forms' ),
230 )
231 );
232
233 wp_localize_script(
234 'everest-forms-admin',
235 'everest_forms_admin',
236 array(
237 'ajax_import_nonce' => wp_create_nonce( 'process-import-ajax-nonce' ),
238 'ajax_url' => admin_url( 'admin-ajax.php', 'relative' ),
239 'i18n_field_meta_key_error' => esc_html__( 'Please enter in meta key with alphanumeric characters, dashes and underscores.', 'everest-forms' ),
240 'i18n_field_min_value_greater' => esc_html__( 'Minimum value is greater than Maximum value.', 'everest-forms' ),
241 'i18n_field_max_value_smaller' => esc_html__( 'Maximum value is smaller than Minimum value.', 'everest-forms' ),
242 'i18n_field_def_value_greater' => esc_html__( 'Default value is greater than Maximum value.', 'everest-forms' ),
243 'i18n_field_def_value_smaller' => esc_html__( 'Default value is smaller than Minimum value.', 'everest-forms' ),
244 'i18n_form_export_action_error' => esc_html__( 'Please select a form which you want to export.', 'everest-forms' ),
245 )
246 );
247 }
248
249 // EverestForms builder pages.
250 if ( in_array( $screen_id, array( 'everest-forms_page_evf-builder' ), true ) ) {
251 wp_enqueue_media();
252 wp_enqueue_script( 'evf-upgrade' );
253 wp_enqueue_script( 'evf-form-builder' );
254
255 // De-register scripts.
256 wp_dequeue_script( 'colorpick' );
257
258 // EverestForms builder setup page.
259 if ( isset( $_GET['create-form'] ) ) { // phpcs:ignore WordPress.Security.NonceVerification
260 wp_register_script( 'evf-setup', evf()->plugin_url() . '/assets/js/admin/evf-setup' . $suffix . '.js', array( 'jquery', 'everest-forms-extensions', 'evf-template-controller' ), EVF_VERSION, true );
261 wp_enqueue_script( 'evf-setup' );
262 wp_localize_script(
263 'evf-setup',
264 'evf_setup_params',
265 array(
266 'ajax_url' => admin_url( 'admin-ajax.php' ),
267 'create_form_nonce' => wp_create_nonce( 'everest_forms_create_form' ),
268 'template_licence_check_nonce' => wp_create_nonce( 'everest_forms_template_licence_check' ),
269 'i18n_form_name' => esc_html__( 'Give it a name.', 'everest-forms' ),
270 'i18n_form_error_name' => esc_html__( 'You must provide a Form name', 'everest-forms' ),
271 'upgrade_url' => apply_filters( 'everest_forms_upgrade_url', 'https://wpeverest.com/wordpress-plugins/everest-forms/pricing/?utm_source=form-template&utm_medium=button&utm_campaign=evf-upgrade-to-pro' ),
272 'upgrade_button' => esc_html__( 'Upgrade Plan', 'everest-forms' ),
273 'upgrade_message' => esc_html__( 'This template requires premium addons. Please upgrade to the Premium plan to unlock all these awesome Templates.', 'everest-forms' ),
274 'upgrade_title' => esc_html__( 'is a Premium Template', 'everest-forms' ),
275 'i18n_form_ok' => esc_html__( 'Continue', 'everest-forms' ),
276 'i18n_form_placeholder' => esc_html__( 'Untitled Form', 'everest-forms' ),
277 'i18n_form_title' => esc_html__( 'Uplift your form experience to the next level.', 'everest-forms' ),
278 )
279 );
280 }
281 }
282
283 // Tools page.
284 if ( 'everest-forms_page_evf-tools' === $screen_id ) {
285 wp_register_script( 'evf-admin-tools', evf()->plugin_url() . '/assets/js/admin/tools' . $suffix . '.js', array( 'jquery' ), EVF_VERSION, true );
286 wp_enqueue_script( 'evf-admin-tools' );
287 wp_localize_script(
288 'evf-admin-tools',
289 'everest_forms_admin_tools',
290 array(
291 'delete_log_confirmation' => esc_js( esc_html__( 'Are you sure you want to delete this log?', 'everest-forms' ) ),
292 'delete_all_log_confirmation' => esc_js( esc_html__( 'Are you sure you want to delete all logs?', 'everest-forms' ) ),
293 )
294 );
295 }
296
297 // Add-ons/extensions page.
298 if ( 'everest-forms_page_evf-addons' === $screen_id ) {
299 wp_enqueue_script( 'everest-forms-extensions' );
300 }
301 }
302 }
303
304 return new EVF_Admin_Assets();
305