PluginProbe
weForms – Easy Drag & Drop Contact Form Builder For WordPress / 1.6.1
weForms – Easy Drag & Drop Contact Form Builder For WordPress v1.6.1
1.6.7 1.6.8 1.6.9 1.6.12 1.6.13 1.6.14 1.6.15 1.6.16 1.6.17 1.6.18 1.6.19 1.6.2 1.6.20 1.6.21 1.6.22 1.6.23 1.6.24 1.6.25 1.6.26 1.6.27 1.6.28 1.6.3 1.6.4 1.6.5 1.6.6 All 74 releases
← All changes | includes/admin/class-form-builder-assets.php +22 -15 1.6.211.6.1 View file →
@@ -9,8 +9,9 @@
9 9 $this->init_actions();
10 10 }
11 11
12 12 public function init_actions() {
13 + add_action( 'in_admin_header', [ $this, 'remove_admin_notices' ] );
13 14 add_action( 'admin_enqueue_scripts', [ $this, 'builder_enqueue_scripts' ], 2000 );
14 15 add_action( 'admin_print_scripts', [ $this, 'builder_mixins_script' ] );
15 16 add_action( 'admin_footer', [ $this, 'admin_footer_js_templates' ] );
16 17
@@ -24,8 +25,25 @@
24 25
25 26 do_action( 'weforms_form_builder_init' );
26 27 }
27 28
29 + /**
30 + * Remove all kinds of admin notices
31 + *
32 + * Since we don't have much space left on top of the page,
33 + * we have to remove all kinds of admin notices
34 + *
35 + * @since 1.2.6
36 + *
37 + * @return void
38 + */
39 + public function remove_admin_notices() {
40 + remove_all_actions( 'network_admin_notices' );
41 + remove_all_actions( 'user_admin_notices' );
42 + remove_all_actions( 'admin_notices' );
43 + remove_all_actions( 'all_admin_notices' );
44 + }
45 +
28 46 public function builder_enqueue_scripts() {
29 47 $prefix = ( defined( 'SCRIPT_DEBUG' ) && SCRIPT_DEBUG ) ? '' : '.min';
30 48
31 49 weforms()->scripts->enqueue_backend();
@@ -30,9 +48,8 @@
30 48
31 49 weforms()->scripts->enqueue_backend();
32 50
33 51 $recaptcha = weforms_get_settings( 'recaptcha' );
34 - $humanpresence = get_option( 'wp-human-presence', array() );
35 52
36 53 $wpuf_form_builder = apply_filters( 'wpuf-form-builder-localize-script', [
37 54 'i18n' => $this->i18n(),
38 55 'panel_sections' => weforms()->fields->get_field_groups(),
@@ -64,16 +81,11 @@
64 81 ],
65 82 ],
66 83 ],
67 84 ],
68 - 'integrations' => weforms()->integrations->get_integration_js_settings(),
69 - 'recaptcha_site' => isset( $recaptcha->key ) ? $recaptcha->key : '',
70 - 'recaptcha_secret' => isset( $recaptcha->secret ) ? $recaptcha->secret : '',
71 - 'humanpresence_installed' => (
72 - class_exists( 'HumanPresenceWEFormsIntegration' ) &&
73 - isset( $humanpresence['wp_hp_premium_license'] ) &&
74 - $humanpresence['wp_hp_premium_license'] )
75 - ? true : false,
85 + 'integrations' => weforms()->integrations->get_integration_js_settings(),
86 + 'recaptcha_site' => isset( $recaptcha->key ) ? $recaptcha->key : '',
87 + 'recaptcha_secret' => isset( $recaptcha->secret ) ? $recaptcha->secret : '',
76 88 ] );
77 89
78 90 // mixins
79 91 $wpuf_mixins = [
@@ -94,9 +106,9 @@
94 106 'mixins' => [ 'default' => null ],
95 107 'assetsURL' => WEFORMS_ASSET_URI,
96 108 'shortcodes' => $this->shortcodes(),
97 109 'settings' => [
98 - 'recaptcha' => weforms_get_settings( 'recaptcha' ),
110 + 'recaptcha' => weforms_get_settings( 'recaptcha' ),
99 111 ],
100 112 ] );
101 113
102 114 wp_localize_script( 'weforms-form-builder-mixins', 'wpuf_form_builder', $wpuf_form_builder );
@@ -344,9 +356,8 @@
344 356
345 357 <a href="#" :class="['nav-tab', isActiveSettingsTab( 'form' ) ? 'nav-tab-active' : '']" v-on:click.prevent="makeActiveSettingsTab( 'form' )" class="nav-tab"><?php esc_html_e( 'Form Settings', 'weforms' ); ?></a>
346 358 <a href="#" :class="['nav-tab', isActiveSettingsTab( 'restriction' ) ? 'nav-tab-active' : '']" v-on:click.prevent="makeActiveSettingsTab( 'restriction' )" class="nav-tab"><?php esc_html_e( 'Submission Restriction', 'weforms' ); ?></a>
347 359 <a href="#" :class="['nav-tab', isActiveSettingsTab( 'display' ) ? 'nav-tab-active' : '']" v-on:click.prevent="makeActiveSettingsTab( 'display' )" class="nav-tab"><?php esc_html_e( 'Display Settings', 'weforms' ); ?></a>
348 - <a href="#" :class="['nav-tab', isActiveSettingsTab( 'humanpresence' ) ? 'nav-tab-active' : '']" v-on:click.prevent="makeActiveSettingsTab( 'humanpresence' )" class="nav-tab"><i aria-hidden="true" class="fa fa-humanpresence"></i> <?php esc_html_e( 'HP Anti-Spam', 'weforms' ); ?></a>
349 360
350 361 <?php do_action( 'wpuf_contact_form_settings_tab' ); ?>
351 362
352 363 <?php
@@ -368,12 +379,8 @@
368 379 </div>
369 380
370 381 <div id="wpuf-metabox-settings-display" class="tab-content" v-show="isActiveSettingsTab('display')">
371 382 <?php include_once __DIR__ . '/views/display-settings.php'; ?>
372 - </div>
373 -
374 - <div id="wpuf-metabox-settings-humanpresence" class="tab-content" v-show="isActiveSettingsTab('humanpresence')">
375 - <?php include_once __DIR__ . '/views/humanpresence-settings.php'; ?>
376 383 </div>
377 384
378 385 <?php do_action( 'wpuf_contact_form_settings_tab_content' ); ?>
379 386