PluginProbe ʕ •ᴥ•ʔ
Email Encoder – Protect Email Addresses and Phone Numbers / 2.3.6
Email Encoder – Protect Email Addresses and Phone Numbers v2.3.6
2.5.2 2.5.1 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 6 months ago sidebar.php 9 months ago
main.php
111 lines
1 <?php
2
3 // $settings = EEB()->settings->get_setting();
4 $settings = $this->getSetting();
5 $advanced_settings = (bool) $this->getSetting( 'advanced_settings', true );
6
7 ?>
8 <div id="post-body-content">
9 <div class="postbox">
10 <div class="inside">
11 <fieldset>
12 <table class="form-table">
13 <?php foreach( $settings as $setting_name => $setting ) :
14 $hide_main_layer = '';
15
16 if( ! $advanced_settings && isset( $setting['advanced'] ) && $setting['advanced'] === true ){
17 $hide_main_layer = 'style="display:none !important;"';
18 }
19
20 //Hide foggy email integration
21 if( $setting['title'] === 'Foggy Email API Key' && ! isset( $_GET['displayfoggy'] ) ){
22 continue;
23 }
24
25 //Validate settings value
26 $main_settings_value = '';
27 if( isset( $setting['value'] ) ){
28 $main_settings_value = $setting['value'];
29 }
30
31 $is_checked = ( $setting['type'] == 'checkbox' && ( $main_settings_value === 1 || $main_settings_value === '1' ) ) ? 'checked' : '';
32 $value = ( $setting['type'] != 'checkbox' && $setting['type'] != 'multi-input' ) ? htmlspecialchars( $main_settings_value ) : '1';
33
34 ?>
35 <tr valign="top" <?php echo $hide_main_layer; ?>>
36 <th scope="row">
37 <?php echo $setting['title']; ?>
38 </th>
39 <td scope="row" valign="top">
40 <p>
41 <?php if( $setting['type'] === 'multi-input' ) : ?>
42 <?php foreach( $setting['inputs'] as $si_key => $data ) :
43 $hide_sub_layer = '';
44
45 if( ! $advanced_settings && isset( $data['advanced'] ) && $data['advanced'] === true ){
46 $hide_sub_layer = 'style="display:none !important;"';
47 }
48
49 //Always set the radio value of single inputs to their key
50 if( $setting['input-type'] === 'radio' ){
51 $data['value'] = $si_key;
52 }
53
54 $mi_is_checked = ( $setting['input-type'] == 'checkbox' && ( isset( $data['value'] ) && ( $data['value'] === 1 || $data['value'] === '1' ) ) ) ? 'checked' : '';
55 $mi_value = ( $setting['input-type'] != 'checkbox' ) ? htmlspecialchars( $data['value'] ) : '1';
56 $si_name = $si_key;
57
58 //Re-validate for radio inputs
59 if( $setting['input-type'] == 'radio' ){
60 $si_name = $setting_name;
61
62 //Check radio button
63 if( (string) $main_settings_value === (string) $data['value'] ){
64 $mi_is_checked = 'checked';
65 }
66 }
67 ?>
68 <p <?php echo $hide_sub_layer; ?>>
69 <input id="<?php echo $si_name . '_' . $si_key; ?>" name="<?php echo $this->getSettingsKey(); ?>[<?php echo $si_name; ?>]" type="<?php echo $setting['input-type']; ?>" class="regular-text" value="<?php echo $mi_value; ?>" <?php echo $mi_is_checked; ?> />
70 <label for="<?php echo $si_name . '_' . $si_key; ?>">
71 <?php echo $data['label']; ?>
72 </label>
73 </p>
74 <?php if( isset( $data['description'] ) ) : ?>
75 <p class="description" <?php echo $hide_sub_layer; ?>>
76 <?php if( in_array( $setting['input-type'], array( 'checkbox', 'radio' ) ) ) : ?>
77 <input name="email-encoder-bundle-hidden-margin" type="radio" class="regular-text" value="" style="visibility:hidden !important;pointer-events:none !important;"/>
78 <?php endif; ?>
79 <?php echo $data['description']; ?>
80 </p>
81 <?php endif; ?>
82 <?php endforeach; ?>
83 <?php else : ?>
84 <input id="<?php echo $setting['id']; ?>" name="<?php echo $this->getSettingsKey(); ?>[<?php echo $setting_name; ?>]" type="<?php echo $setting['type']; ?>" class="regular-text" value="<?php echo $value; ?>" <?php echo $is_checked; ?> />
85 <?php if( isset( $setting['label'] ) ) : ?>
86 <label for="<?php echo $setting_name; ?>">
87 <?php echo $setting['label']; ?>
88 </label>
89 <?php endif; ?>
90 <?php endif; ?>
91 </p>
92 <?php if( isset( $setting['description'] ) ) : ?>
93 <p class="description">
94 <?php echo $setting['description']; ?>
95 </p>
96 <?php endif; ?>
97 </td>
98 <td>
99
100 </td>
101 </tr>
102 <?php endforeach; ?>
103 </table>
104 </fieldset>
105
106 <p>
107 <?php submit_button( __( 'Save all', 'email-encoder-bundle' ) ); ?>
108 </p>
109 </div>
110 </div>
111 </div>