PluginProbe ʕ •ᴥ•ʔ
Everest Forms – Contact Form, Payment Form, Quiz, Survey & Custom Form Builder with AI / 3.5.2
Everest Forms – Contact Form, Payment Form, Quiz, Survey & Custom Form Builder with AI v3.5.2
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 / addons / BeaverBuilder / Helper.php
everest-forms / addons / BeaverBuilder Last commit date
includes 1 year ago BeaverBuilder.php 1 year ago EverestFormModule.php 1 year ago Helper.php 1 year ago
Helper.php
111 lines
1 <?php
2 /**
3 * Beaver Integration helper functions.
4 *
5 * @since 3.0.5
6 * @package EverestForms\Addons\BeaverBuilder
7 */
8
9 namespace EverestForms\Addons\BeaverBuilder;
10
11 /**
12 * Beaver Integration helper functions.
13 *
14 * @package EverestForms\Addons\BeaverBuilder
15 *
16 * @since 3.0.5
17 */
18 class Helper {
19
20 /**
21 * Return if Beaver is active.
22 *
23 * @since 3.0.5
24 *
25 * @return boolean
26 */
27 public static function is_beaver_active() {
28 return in_array( 'bb-plugin/fl-builder.php', get_option( 'active_plugins', array() ), true )
29 || in_array( 'beaver-builder-lite-version/fl-builder.php', get_option( 'active_plugins', array() ), true );
30 }
31
32 /**
33 * Check if the current request is for beaver editor.
34 *
35 * @since 3.0.5
36 *
37 * @return boolean
38 */
39 public static function is_beaver_editor() {
40 return isset( $_REQUEST['fl_builder'] ) && isset( $_REQUEST['fl_builder_ui'] ); // phpcs:ignore WordPress.Security.NonceVerification.Recommended
41 }
42
43
44 /**
45 * Notice if the beaver is not installed.
46 *
47 * @since 3.0.5
48 */
49 public static function print_admin_notice() {
50
51 add_action(
52 'admin_notices',
53 function () {
54 printf(
55 '<div class="notice notice-warning is-dismissible"><p><strong>%s </strong>%s</p><button type="button" class="notice-dismiss"><span class="screen-reader-text">%s</span></button></div>',
56 esc_html( 'Everest Forms:' ),
57 wp_kses_post( 'Beaver Integration addon requires Beaver to be installed and activated.', 'everest-forms' ),
58 esc_html__( 'Dismiss this notice.', 'everest-forms' )
59 );
60 }
61 );
62
63 return;
64 }
65
66 /**
67 * Get the form list.
68 *
69 * @since 3.0.5
70 */
71 public static function get_form_list() {
72 $forms = evf_get_all_forms();
73
74 if ( empty( $forms ) ) {
75 return $forms;
76 }
77
78 $forms[0] = esc_html__( 'Select a Form', 'everest-forms' );
79
80 return $forms;
81 }
82
83 /**
84 * Return all the array data for courses categories settings.
85 *
86 * @since 1.10.0 [Free]
87 *
88 * @return array
89 */
90 public static function get_everest_forms_setting() {
91 return array(
92 'tab-01' => array(
93 'title' => __( 'Everest Forms', 'everest-forms' ),
94 'sections' => array(
95 'everest-forms-selector' => array(
96 'title' => __( 'Form Selection', 'everest-forms' ),
97 'fields' => array(
98 'form_selection' => array(
99 'type' => 'select',
100 'label' => __( 'Select a Form', 'everest-forms' ),
101 'options' => self::get_form_list(),
102 'help' => __( 'Choose a form from the list.', 'everest-forms' ),
103 ),
104 ),
105 ),
106 ),
107 ),
108 );
109 }
110 }
111