PluginProbe
Awesome Support – WordPress HelpDesk & Support Plugin / trunk
Awesome Support – WordPress HelpDesk & Support Plugin vtrunk
6.4.0 trunk 3.0.0 3.0.1 3.1.0 3.1.1 3.1.10 3.1.11 3.1.12 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.2.4 3.2.5 3.2.6 3.2.7 All 95 releases
awesome-support / includes / admin / settings / settings-privacy.php

settings-privacy.php in Awesome Support – WordPress HelpDesk & Support Plugin trunk, at includes/admin/settings/settings-privacy.php

216 lines 9.0 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2 add_filter( 'wpas_plugin_settings', 'wpas_core_settings_privacy', 5, 1 );
3 /**
4 * Add plugin core settings for privacy options.
5 *
6 * @param array $def Array of existing settings
7 *
8 * @return array Updated settings
9 */
10 function wpas_core_settings_privacy( $def ) {
11
12 $settings = array(
13 'privacy' => array(
14 'name' => __( 'Privacy', 'awesome-support' ),
15 'options' => array(
16
17 array(
18 'name' => __( 'Privacy', 'awesome-support' ),
19 'desc' => __( 'Control how the PRIVACY button appears to the user and the options available with it', 'awesome-support' ),
20 'type' => 'heading',
21 ),
22
23 array(
24 'name' => __( 'Show Button', 'awesome-support' ),
25 'id' => 'privacy_show_button',
26 'type' => 'checkbox',
27 'desc' => __( 'Show the PRIVACY button on the front-end where users can request deletion of their data, export their data and modify their opt-in selections', 'awesome-support' ),
28 'default' => true,
29 ),
30 array(
31 'name' => __( 'Button Label', 'awesome-support' ),
32 'id' => 'privacy_button_label',
33 'type' => 'text',
34 'desc' => __( 'Enter the label for the Privacy button in My Tickets page.', 'awesome-support' ),
35 'default' => 'Privacy'
36 ),
37 array(
38 'name' => __( 'Privacy Popup Heading', 'awesome-support' ),
39 'id' => 'privacy_popup_header',
40 'type' => 'editor',
41 'desc' => __( 'Enter content that the user should see at the top of the popup when the Privacy button in the My Tickets page is clicked.', 'awesome-support' ),
42 'default' => ''
43 ),
44 array(
45 'name' => __( 'Privacy Popup Footer', 'awesome-support' ),
46 'id' => 'privacy_popup_footer',
47 'type' => 'editor',
48 'desc' => __( 'Enter content that the user should see at the bottom of the popup when the Privacy button in the My Tickets page is clicked.', 'awesome-support' ),
49 'default' => ''
50 ),
51
52 array(
53 'name' => __( 'Tabs', 'awesome-support' ),
54 'desc' => __( 'Enable or disable the tabs that will show in the privacy popup', 'awesome-support' ),
55 'type' => 'heading',
56 ),
57 array(
58 'name' => __( 'Show Consent Tab', 'awesome-support' ),
59 'id' => 'privacy_show_consent_tab',
60 'type' => 'checkbox',
61 'desc' => __( 'Show the tab that allows users to modify their existing consent', 'awesome-support' ),
62 'default' => true,
63 ),
64 array(
65 'name' => __( 'Show Delete Existing Data Tab', 'awesome-support' ),
66 'id' => 'privacy_show_delete_data_tab',
67 'type' => 'checkbox',
68 'desc' => __( 'Show the tab that allows users to request deletion of their data', 'awesome-support' ),
69 'default' => true,
70 ),
71 array(
72 'name' => __( 'Show Export Data Tab', 'awesome-support' ),
73 'id' => 'privacy_show_export_data_tab',
74 'type' => 'checkbox',
75 'desc' => __( 'Show the tab that allows users to request export of their data', 'awesome-support' ),
76 'default' => true,
77 ),
78 array(
79 'name' => __( 'Show Export Tab', 'awesome-support' ),
80 'id' => 'privacy_show_export_tab',
81 'type' => 'checkbox',
82 'desc' => __( 'Show the tab that allows users to export their ticket data', 'awesome-support' ),
83 'default' => true,
84 ),
85
86 array(
87 'name' => __( 'Delete Existing Data', 'awesome-support' ),
88 'desc' => __( 'Options when allowing users to request deletion of their data', 'awesome-support' ),
89 'type' => 'heading',
90 ),
91 array(
92 'name' => __( 'Subject', 'awesome-support' ),
93 'id' => 'delete_existing_data_subject',
94 'type' => 'text',
95 'desc' => __( 'This is the subject of the ticket that will be submitted when the user opens a ticket to request deletion of their data', 'awesome-support' ),
96 'default' => __( 'Official Request: Please Delete My Existing Data ("Right To Be Forgotten").', 'awesome-support' )
97 ),
98 array(
99 'name' => __( 'Anonymize instead of Delete', 'awesome-support' ),
100 'id' => 'anonymize_existing_data',
101 'type' => 'checkbox',
102 'desc' => __( 'Option to anonymize the user data instead of deleting it - this helps to keep statistics accurate. New anonymous users will be created and attached to existing tickets.', 'awesome-support' ),
103 ),
104 array(
105 'name' => __( 'User Can Submit Additional Information', 'awesome-support' ),
106 'id' => 'delete_existing_data_add_information',
107 'type' => 'checkbox',
108 'default' => true,
109 'desc' => __( 'Do you want to allow the user to enter a longer description related to their request to delete their data?', 'awesome-support' )
110 ),
111
112 array(
113 'name' => __( 'Export All Data', 'awesome-support' ),
114 'desc' => __( 'Options when allowing users to request export of their tickets data', 'awesome-support' ),
115 'type' => 'heading',
116 ),
117 array(
118 'name' => __( 'Subject', 'awesome-support' ),
119 'id' => 'export_existing_data_subject',
120 'type' => 'text',
121 'desc' => __( 'This is the subject of the ticket that will be submitted when the user opens a ticket to request export of their data', 'awesome-support' ),
122 'default' => __( 'Official Request: Please Export My Existing Data.', 'awesome-support' )
123 ),
124 array(
125 'name' => __( 'User Can Submit Additional Information', 'awesome-support' ),
126 'id' => 'export_existing_data_add_information',
127 'type' => 'checkbox',
128 'default' => true,
129 'desc' => __( 'Do you want to allow the user to enter a longer description related to their request to export their data?', 'awesome-support' )
130 ),
131
132 array(
133 'name' => __( 'Periodic Anonymization', 'awesome-support' ),
134 'type' => 'heading',
135 'desc' => __( 'Use the options in this section to enable a periodic cron process to anonymize or delete old tickets', 'awesome-support' ),
136 ),
137 array(
138 'name' => __( 'Enable Periodic Anonymization', 'awesome-support' ),
139 'id' => 'anonymize_cron_job',
140 'type' => 'checkbox',
141 'desc' => __( 'Enable the periodic process that will anonymize or delete old tickets', 'awesome-support' ),
142 'default' => false
143 ),
144 array(
145 'name' => __( 'Cron Job Interval', 'awesome-support' ),
146 'id' => 'anonymize_cronjob_trigger_time',
147 'type' => 'number',
148 'desc' => __( 'How often should we run the anonymization process? The value entered here is in minutes - 1440 minutes is one day.', 'awesome-support' ),
149 'max' => 10000,
150 'default' => 1440
151 ),
152 array(
153 'name' => __( 'Ticket Age', 'awesome-support' ),
154 'id' => 'anonymize_cronjob_max_age',
155 'type' => 'number',
156 'desc' => __( 'How old should tickets be before they are anonymized or deleted? Enter a value in days - default is 180 days or approximately six months.', 'awesome-support' ),
157 'default' => 180
158 ),
159 array(
160 'name' => __( 'Delete Tickets', 'awesome-support' ),
161 'id' => 'anonymize_cronjob_delete_tickets',
162 'type' => 'checkbox',
163 'default' => false,
164 'desc' => __( 'Delete tickets instead of anonymizing them. WARNING: Deleted tickets CANNOT be recovered!', 'awesome-support' )
165 ),
166
167 array(
168 'name' => __( 'Tickets to Anonymize', 'awesome-support' ),
169 'type' => 'heading',
170 ),
171 array(
172 'name' => __( 'Closed Tickets', 'awesome-support' ),
173 'id' => 'closed_tickets_anonmyize',
174 'type' => 'checkbox',
175 'desc' => __( 'Anonymize CLOSED tickets', 'awesome-support' ),
176 'default' => true
177 ),
178 array(
179 'name' => __( 'Open Tickets', 'awesome-support' ),
180 'id' => 'open_tickets_anonmyize',
181 'type' => 'checkbox',
182 'desc' => __( 'Anonymize OPEN tickets', 'awesome-support' ),
183 'default' => false
184 ),
185
186 array(
187 'name' => __( 'Anonymized User ID Options', 'awesome-support' ),
188 'type' => 'heading',
189 'desc' => __( 'When anonymizing tickets a random user is created to replace the existing user. These options control how you create the anonymized user names', 'awesome-support' ),
190 ),
191
192 array(
193 'name' => __( 'How should we create the anonymized user?', 'awesome-support' ),
194 'id' => 'anonmyize_user_creation_method',
195 'type' => 'radio',
196 'default' => '1',
197 'options' => array(
198 '1' => __( 'Default', 'awesome-support' ),
199 '2' => __( 'Random one-way hash', 'awesome-support' ),
200 '3' => __( 'Use the user id below', 'awesome-support' ),
201 )
202 ),
203 array(
204 'name' => __( 'Anonymized User ID', 'awesome-support' ),
205 'id' => 'anonmyize_user_id',
206 'type' => 'text',
207 'desc' => __( 'Use this user id for all anonymized tickets. Warning: This should be a VALID user id otherwise you will corrupt your database. This only applies if the above option is set to USE THE USER ID BELOW.', 'awesome-support' ),
208 ),
209
210 )
211 ),
212 );
213
214 return array_merge( $def, apply_filters('wpas_settings_privacy', $settings ) );
215
216 }