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 / abstracts / class-evf-integration.php
everest-forms / includes / abstracts Last commit date
legacy 6 years ago class-evf-background-process.php 7 years ago class-evf-deprecated-hooks.php 6 years ago class-evf-form-fields.php 2 years ago class-evf-integration.php 5 years ago class-evf-log-handler.php 6 years ago class-evf-session.php 7 years ago class-evf-settings-api.php 4 years ago
class-evf-integration.php
103 lines
1 <?php
2 /**
3 * Abstract Integration class
4 *
5 * Extension of the Settings API which in turn gets extended
6 * by individual integrations to offer additional functionality.
7 *
8 * @package EverestForms\Abstracts
9 * @since 1.3.0
10 */
11
12 defined( 'ABSPATH' ) || exit;
13
14 /**
15 * Abstract Integration Class.
16 */
17 abstract class EVF_Integration extends EVF_Settings_API {
18
19 /**
20 * Yes or no based on whether the integration is enabled.
21 *
22 * @var string
23 */
24 public $enabled = 'yes';
25
26 /**
27 * Integration icon.
28 *
29 * @var string
30 */
31 public $icon = '';
32
33 /**
34 * Integration title.
35 *
36 * @var string
37 */
38 public $method_title = '';
39
40 /**
41 * Integration description.
42 *
43 * @var string
44 */
45 public $method_description = '';
46
47 /**
48 * Get integration ID
49 *
50 * @return array Integration stored data.
51 */
52 public function get_integration() {
53 $integrations = get_option( 'everest_forms_integrations', array() );
54
55 return in_array( $this->id, array_keys( $integrations ), true ) ? $integrations[ $this->id ] : array();
56 }
57
58 /**
59 * Return the title for admin screens.
60 *
61 * @return string
62 */
63 public function get_method_title() {
64 return apply_filters( 'everest_forms_integration_title', $this->method_title, $this );
65 }
66
67 /**
68 * Return the description for admin screens.
69 *
70 * @return string
71 */
72 public function get_method_description() {
73 return apply_filters( 'everest_forms_integration_description', $this->method_description, $this );
74 }
75
76 /**
77 * Output the gateway settings screen.
78 */
79 public function admin_options() {
80 echo '<h2>' . esc_html( $this->get_method_title() ) . '</h2>';
81 echo wp_kses_post( wpautop( $this->get_method_description() ) );
82 echo '<div><input type="hidden" name="section" value="' . esc_attr( $this->id ) . '" /></div>';
83 parent::admin_options();
84 }
85
86 /**
87 * Init settings for gateways.
88 */
89 public function init_settings() {
90 parent::init_settings();
91 $this->enabled = ! empty( $this->settings['enabled'] ) && 'yes' === $this->settings['enabled'] ? 'yes' : 'no';
92 }
93
94 /**
95 * Check if is integration page.
96 *
97 * @return bool
98 */
99 public function is_integration_page() {
100 return isset( $_GET['page'], $_GET['tab'], $_GET['section'] ) && 'evf-settings' === $_GET['page'] && 'integration' === $_GET['tab'] && (string) $this->id === $_GET['section']; // phpcs:ignore WordPress.Security.NonceVerification
101 }
102 }
103