PluginProbe ʕ •ᴥ•ʔ
PiWeb Delivery & Pickup Date Time for WooCommerce / 3.0.62
PiWeb Delivery & Pickup Date Time for WooCommerce v3.0.62
3.0.63 3.0.62 3.0.61 3.0.60 3.0.49.49 3.0.49.6 3.0.49.60 3.0.49.61 3.0.49.62 3.0.49.63 3.0.49.64 3.0.49.66 3.0.49.67 3.0.49.69 3.0.49.7 3.0.49.70 3.0.49.72 3.0.49.73 3.0.49.74 3.0.49.76 3.0.49.77 3.0.49.79 3.0.49.9 3.0.49.90 3.0.49.91 3.0.49.92 3.0.49.93 3.0.49.94 3.0.49.96 3.0.49.97 3.0.49.99 trunk 1.0 1.1 1.2 1.2.1 1.2.2 1.2.3 1.2.4 1.2.5 2.9.17 3.0.47 3.0.49 3.0.49.1 3.0.49.10 3.0.49.11 3.0.49.12 3.0.49.13 3.0.49.16 3.0.49.17 3.0.49.19 3.0.49.2 3.0.49.20 3.0.49.21 3.0.49.22 3.0.49.23 3.0.49.24 3.0.49.26 3.0.49.27 3.0.49.29 3.0.49.3 3.0.49.30 3.0.49.31 3.0.49.32 3.0.49.33 3.0.49.34 3.0.49.36 3.0.49.37 3.0.49.39 3.0.49.4 3.0.49.40 3.0.49.41 3.0.49.42 3.0.49.43 3.0.49.44 3.0.49.46 3.0.49.47
pi-woocommerce-order-date-time-and-type / admin / options-accesscontrol.php
pi-woocommerce-order-date-time-and-type / admin Last commit date
css 3 weeks ago img 3 weeks ago js 3 weeks ago partials 3 weeks ago class-accesscontrol.php 3 weeks ago class-adv-order-filter.php 3 weeks ago class-analytics.php 3 weeks ago class-order-tip-promotion.php 3 weeks ago class-pi-dtt-labels.php 3 weeks ago class-pi-dtt-order-table.php 3 weeks ago conflict-fixer.php 3 weeks ago menu.php 3 weeks ago options-accesscontrol.php 3 weeks ago options-addons.php 3 weeks ago options-date.php 3 weeks ago options-limit.php 3 weeks ago options-pickup.php 3 weeks ago options-time-slot.php 3 weeks ago options-time.php 3 weeks ago options.php 3 weeks ago
options-accesscontrol.php
93 lines
1 <?php
2 if ( ! defined( 'ABSPATH' ) ) exit;
3
4 class pisol_dtt_option_accesscontrol{
5
6 private $settings = array();
7
8 private $active_tab;
9
10 private $this_tab = 'accesscontrol';
11
12 private $tab_name = "Access control";
13
14 private $setting_key = 'pisol_dtt_accesscontrol';
15
16 private $pro_version = false;
17
18 public $tab;
19
20 public $preparation_days;
21
22 function __construct(){
23
24 $this->tab = sanitize_text_field(filter_input( INPUT_GET, 'tab'));
25 $this->active_tab = $this->tab != "" ? $this->tab : 'default';
26
27 $this->settings = array(
28
29 array('field'=>'color-setting', 'class'=> 'bg-dark opacity-75 text-light', 'class_title'=>'text-light font-weight-light h4', 'label' => __('&#128230; Access control','pisol-dtt'), 'type'=>'setting_category'),
30
31 array('field'=>'pi_dtt_allow_shop_manager', 'default'=> 0, 'type'=>'switch', 'label'=>__('Give access to store manager','pisol-dtt'),'desc'=>__('Allow store manager to make changes in the setting of this plugin','pisol-dtt')),
32
33 );
34
35
36 if($this->this_tab == $this->active_tab){
37 add_action('pisol_dtt_tab_content', array($this,'tab_content'));
38 }
39
40 add_action('pisol_dtt_tab', array($this,'tab'),8);
41
42 $this->register_settings();
43
44 if(PISOL_DTT_FREE_RESET_SETTING){
45 $this->delete_settings();
46 }
47
48 }
49
50 function delete_settings(){
51 foreach($this->settings as $setting){
52 delete_option( $setting['field'] );
53 }
54 }
55
56 function register_settings(){
57
58 foreach($this->settings as $setting){
59 pisol_class_form::register_setting( $this->setting_key, $setting);
60 }
61
62 }
63
64 function tab(){
65 $page = sanitize_text_field(filter_input( INPUT_GET, 'page'));
66 $this->tab_name = __('Access control','pisol-dtt');
67 ?>
68 <a class=" pi-side-menu <?php echo ($this->active_tab == $this->this_tab ? 'bg-primary' : 'bg-secondary'); ?>" href="<?php echo esc_url( admin_url( 'admin.php?page='.$page.'&tab='.$this->this_tab ) ); ?>">
69 <span class="dashicons dashicons-universal-access"></span> <?php echo esc_html($this->tab_name); ?>
70 </a>
71 <?php
72 }
73
74 function tab_content(){
75 ?>
76 <form method="post" action="options.php" class="pisol-setting-form">
77 <?php settings_fields( $this->setting_key ); ?>
78 <?php
79 foreach($this->settings as $setting){
80 new pisol_class_form($setting, $this->setting_key);
81 }
82 ?>
83 <input type="submit" name="submit" id="submit" class="btn btn-primary btn-md my-3" value="<?php echo esc_attr__('Save Changes','pisol-dtt'); ?>">
84 </form>
85 <?php
86 }
87
88 }
89
90 add_action('wp_loaded',function(){
91 new pisol_dtt_option_accesscontrol();
92 });
93