PluginProbe ʕ •ᴥ•ʔ
Email Encoder – Protect Email Addresses and Phone Numbers / 2.2.0
Email Encoder – Protect Email Addresses and Phone Numbers v2.2.0
2.5.0 2.4.8 trunk 0.10 0.11 0.12 0.20 0.21 0.22 0.30 0.31 0.32 0.40 0.41 0.42 0.50 0.60 0.70 0.71 0.80 1.0.0 1.0.1 1.0.2 1.1.0 1.2.0 1.2.1 1.3.0 1.4.0 1.4.1 1.4.2 1.4.3 1.4.4 1.4.5 1.4.6 1.5 1.5.2 1.51 1.53 2.0.0 2.0.1 2.0.2 2.0.3 2.0.4 2.0.5 2.0.6 2.0.7 2.0.8 2.0.9 2.1.0 2.1.1 2.1.10 2.1.2 2.1.3 2.1.4 2.1.5 2.1.6 2.1.7 2.1.8 2.1.9 2.2.0 2.2.1 2.2.2 2.2.3 2.2.4 2.2.5 2.3.0 2.3.1 2.3.3 2.3.4 2.3.5 2.3.6 2.3.7 2.3.8 2.3.9 2.4.0 2.4.1 2.4.2 2.4.3 2.4.4 2.4.5 2.4.6 2.4.7
email-encoder-bundle / core / includes / partials / widgets / main.php
email-encoder-bundle / core / includes / partials / widgets Last commit date
main.php 2 years ago sidebar.php 2 years ago
main.php
110 lines
1 <?php
2
3 $settings = EEB()->settings->get_setting();
4 $advanced_settings = (bool) EEB()->settings->get_setting( 'advanced_settings', true );
5
6 ?>
7 <div id="post-body-content">
8 <div class="postbox">
9 <div class="inside">
10 <fieldset>
11 <table class="form-table">
12 <?php foreach( $settings as $setting_name => $setting ) :
13 $hide_main_layer = '';
14
15 if( ! $advanced_settings && isset( $setting['advanced'] ) && $setting['advanced'] === true ){
16 $hide_main_layer = 'style="display:none !important;"';
17 }
18
19 //Hide foggy email integration
20 if( $setting['title'] === 'Foggy Email API Key' && ! isset( $_GET['displayfoggy'] ) ){
21 continue;
22 }
23
24 //Validate settings value
25 $main_settings_value = '';
26 if( isset( $setting['value'] ) ){
27 $main_settings_value = $setting['value'];
28 }
29
30 $is_checked = ( $setting['type'] == 'checkbox' && ( $main_settings_value === 1 || $main_settings_value === '1' ) ) ? 'checked' : '';
31 $value = ( $setting['type'] != 'checkbox' && $setting['type'] != 'multi-input' ) ? $main_settings_value : '1';
32
33 ?>
34 <tr valign="top" <?php echo $hide_main_layer; ?>>
35 <th scope="row">
36 <?php echo $setting['title']; ?>
37 </th>
38 <td scope="row" valign="top">
39 <p>
40 <?php if( $setting['type'] === 'multi-input' ) : ?>
41 <?php foreach( $setting['inputs'] as $si_key => $data ) :
42 $hide_sub_layer = '';
43
44 if( ! $advanced_settings && isset( $data['advanced'] ) && $data['advanced'] === true ){
45 $hide_sub_layer = 'style="display:none !important;"';
46 }
47
48 //Always set the radio value of single inputs to their key
49 if( $setting['input-type'] === 'radio' ){
50 $data['value'] = $si_key;
51 }
52
53 $mi_is_checked = ( $setting['input-type'] == 'checkbox' && ( isset( $data['value'] ) && ( $data['value'] === 1 || $data['value'] === '1' ) ) ) ? 'checked' : '';
54 $mi_value = ( $setting['input-type'] != 'checkbox' ) ? $data['value'] : '1';
55 $si_name = $si_key;
56
57 //Re-validate for radio inputs
58 if( $setting['input-type'] == 'radio' ){
59 $si_name = $setting_name;
60
61 //Check radio button
62 if( (string) $main_settings_value === (string) $data['value'] ){
63 $mi_is_checked = 'checked';
64 }
65 }
66 ?>
67 <p <?php echo $hide_sub_layer; ?>>
68 <input id="<?php echo $si_name . '_' . $si_key; ?>" name="<?php echo $this->settings_key; ?>[<?php echo $si_name; ?>]" type="<?php echo $setting['input-type']; ?>" class="regular-text" value="<?php echo $mi_value; ?>" <?php echo $mi_is_checked; ?> />
69 <label for="<?php echo $si_name . '_' . $si_key; ?>">
70 <?php echo $data['label']; ?>
71 </label>
72 </p>
73 <?php if( isset( $data['description'] ) ) : ?>
74 <p class="description" <?php echo $hide_sub_layer; ?>>
75 <?php if( in_array( $setting['input-type'], array( 'checkbox', 'radio' ) ) ) : ?>
76 <input name="email-encoder-bundle-hidden-margin" type="radio" class="regular-text" value="" style="visibility:hidden !important;pointer-events:none !important;"/>
77 <?php endif; ?>
78 <?php echo $data['description']; ?>
79 </p>
80 <?php endif; ?>
81 <?php endforeach; ?>
82 <?php else : ?>
83 <input id="<?php echo $setting['id']; ?>" name="<?php echo $this->settings_key; ?>[<?php echo $setting_name; ?>]" type="<?php echo $setting['type']; ?>" class="regular-text" value="<?php echo $value; ?>" <?php echo $is_checked; ?> />
84 <?php if( isset( $setting['label'] ) ) : ?>
85 <label for="<?php echo $setting_name; ?>">
86 <?php echo $setting['label']; ?>
87 </label>
88 <?php endif; ?>
89 <?php endif; ?>
90 </p>
91 <?php if( isset( $setting['description'] ) ) : ?>
92 <p class="description">
93 <?php echo $setting['description']; ?>
94 </p>
95 <?php endif; ?>
96 </td>
97 <td>
98
99 </td>
100 </tr>
101 <?php endforeach; ?>
102 </table>
103 </fieldset>
104
105 <p>
106 <?php submit_button( __( 'Save all', 'email-encoder-bundle' ) ); ?>
107 </p>
108 </div>
109 </div>
110 </div>