PluginProbe ʕ •ᴥ•ʔ
JetFormBuilder — Dynamic Blocks Form Builder / 1.2.6
JetFormBuilder — Dynamic Blocks Form Builder v1.2.6
3.6.3.1 3.6.3 3.6.2.2 3.6.2.1 3.6.2 3.6.1.1 3.6.1 3.6.0.1 trunk 1.0.0 1.0.1 1.0.2 1.0.3 1.1.0 1.1.1 1.1.2 1.1.3 1.1.4 1.1.5 1.1.6 1.1.7 1.2.0 1.2.1 1.2.2 1.2.3 1.2.4 1.2.5 1.2.6 1.2.7 1.3.0 1.3.1 1.3.2 1.3.3 1.4.0 1.4.1 1.4.2 1.4.3 1.5.0 1.5.1 1.5.2 1.5.3 1.5.4 1.5.5 2.0.0 2.0.1 2.0.2 2.0.3 2.0.4 2.0.5 2.0.6 2.1.0 2.1.1 2.1.10 2.1.11 2.1.2 2.1.3 2.1.4 2.1.5 2.1.6 2.1.7 2.1.8 2.1.9 3.0.0 3.0.0.1 3.0.0.2 3.0.0.3 3.0.1 3.0.1.1 3.0.2 3.0.3 3.0.4 3.0.5 3.0.6 3.0.7 3.0.8 3.0.9 3.1.0 3.1.0.1 3.1.1 3.1.2 3.1.3 3.1.4 3.1.5 3.1.6 3.1.7 3.1.8 3.1.9 3.2.0 3.2.1 3.2.2 3.2.3 3.3.0 3.3.1 3.3.2 3.3.3 3.3.3.1 3.3.4 3.3.4.1 3.3.4.2 3.4.0 3.4.1 3.4.2 3.4.3 3.4.4 3.4.5 3.4.5.1 3.4.5.2 3.4.6 3.4.7 3.4.7.1 3.5.0 3.5.1 3.5.1.1 3.5.1.2 3.5.2 3.5.2.1 3.5.3 3.5.4 3.5.5 3.5.6 3.5.6.1 3.5.6.2 3.5.6.3 3.6.0
jetformbuilder / includes / admin / tabs-handlers / base-handler.php
jetformbuilder / includes / admin / tabs-handlers Last commit date
active-campaign-handler.php 4 years ago base-handler.php 4 years ago captcha-handler.php 4 years ago get-response-handler.php 4 years ago mailchimp-handler.php 4 years ago payments-gateways-handler.php 4 years ago paypal-handler.php 4 years ago tab-handler-manager.php 4 years ago
base-handler.php
71 lines
1 <?php
2
3
4 namespace Jet_Form_Builder\Admin\Tabs_Handlers;
5
6
7 abstract class Base_Handler {
8
9 private $prefix = 'jet_form_builder_settings__';
10
11 abstract public function slug();
12
13 abstract public function on_get_request();
14
15 abstract public function on_load();
16
17 public function __construct() {
18 add_action( 'jet-fb/admin-pages/before-assets/jfb-settings', array( $this, 'before_assets' ) );
19 }
20
21 /**
22 * Define this, if you want to save options
23 * in Tab_Handler_Manager::$_tabs_options.
24 *
25 * Then you can get this data via
26 * $this->get_global_options()
27 *
28 * @return array
29 */
30 public function save_global_default() {
31 return array();
32 }
33
34 public function is_visible( $advanced_options ) {
35 return true;
36 }
37
38 public function get_options( $default = array() ) {
39 $response = get_option( $this->option_name(), false );
40
41 $response = $response
42 ? json_decode( $response, true )
43 : array();
44
45 return array_merge( $default, $response );
46 }
47
48 public function update_options( $options ) {
49 $options = json_encode( $options );
50
51 return update_option( $this->option_name(), $options );
52 }
53
54 public function before_assets() {
55 }
56
57 public function save_global_options( $default = array() ) {
58 Tab_Handler_Manager::instance()->save_options_tab(
59 $this->slug(),
60 $this->get_options( $default )
61 );
62 }
63
64 public function get_global_options() {
65 return Tab_Handler_Manager::instance()->get_options_tab( $this->slug() );
66 }
67
68 public function option_name() {
69 return $this->prefix . $this->slug();
70 }
71 }