LLMS_Settings_Accounts::get_settings()

Get settings array


Return Return

(array)


Top ↑

Source Source

File: includes/admin/settings/class.llms.settings.accounts.php

52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
*/
public function get_settings() {
    $account_settings = array(
        array(
            'class' => 'top',
            'id'    => 'course_account_options',
            'type'  => 'sectionstart',
        ),
        array(
            'id'    => 'account_page_options_start',
            'title' => __( 'Student Dashboard', 'lifterlms' ),
            'type'  => 'title',
        ),
        array(
            'title'             => __( 'Dashboard Page', 'lifterlms' ),
            'desc'              => __( 'Page where students can view and manage their current enrollments, earned certificates and achievements, account information, and purchase history.', 'lifterlms' ),
            'id'                => 'lifterlms_myaccount_page_id',
            'default'           => '',
            'desc_tip'          => true,
            'class'             => 'llms-select2-post',
            'type'              => 'select',
            'custom_attributes' => array(
                'data-post-type' => 'page',
            ),
            'options'           => llms_make_select2_post_array( get_option( 'lifterlms_myaccount_page_id', '' ) ),
        ),
        array(
            'title'   => __( 'Courses Sorting', 'lifterlms' ),
            'default' => 'order,ASC',
            'desc'    => __( 'Determines the order of the courses in-progress listed on the student dashboard.', 'lifterlms' ),
            'id'      => 'lifterlms_myaccount_courses_in_progress_sorting',
            'type'    => 'select',
            'options' => array(
                'title,ASC'  => __( 'Course Title (A to Z)', 'lifterlms' ),
                'title,DESC' => __( 'Course Title (Z to A)', 'lifterlms' ),
                'date,DESC'  => __( 'Enrollment Date (Most Recent to Least Recent)', 'lifterlms' ),
                'order,ASC'  => __( 'Order (Low to High)', 'lifterlms' ),
                'order,DESC' => __( 'Order (High to Low)', 'lifterlms' ),
            ),
        ),
        array(
            'default' => 'no',
            'desc'    => sprintf(
                // Translators: %1$s = opening anchor tag; %2$s = closing anchor tag.
                __( 'Enable new user registration on the Student Dashboard. %1$sLearn More%2$s.', 'lifterlms' ),
                '<a href="https://lifterlms.com/docs/open-registration/" target="_blank">',
                '</a>'
            ),
            'id'      => 'lifterlms_enable_myaccount_registration',
            'title'   => __( 'Open Registration', 'lifterlms' ),
            'type'    => 'checkbox',
        ),
        array(
            'default'           => 'no',
            'desc'              => __( 'Only allow the most recent login for each user account.', 'lifterlms' ),
            'id'                => 'lifterlms_prevent_concurrent_logins',
            'title'             => __( 'Prevent concurrent logins', 'lifterlms' ),
            'type'              => 'checkbox',
            'custom_attributes' => array(
                'class'         => 'llms-conditional-controller',
                'data-controls' => '#lifterlms_prevent_concurrent_logins_roles',
            ),
        ),
        array(
            'class'             => 'llms-select2',
            'default'           => array( 'student' ),
            'desc'              => __( 'Prevent concurrent logins for users with the selected user roles.', 'lifterlms' ),
            'id'                => 'lifterlms_prevent_concurrent_logins_roles',
            'options'           => LLMS_Roles::get_all_role_names(),
            'title'             => '',
            'type'              => 'multiselect',
            'custom_attributes' => array(
                'data-placeholder' => __( 'Select user roles', 'lifterlms' ),
            ),
        ),
        array(
            'id'   => 'course_account_options_end',
            'type' => 'sectionend',
        ),
        array(
            'class' => 'top',
            'id'    => 'course_account_endpoint_options_start',
            'type'  => 'sectionstart',
        ),
        array(
            'id'    => 'account_page_endpoint_options_title',
            'title' => __( 'Student Dashboard Endpoints', 'lifterlms' ),
            'desc'  => __( 'Each endpoint allows students to view more information or manage parts of their account. Each endpoint should be unique, URL-safe, and can be left blank to disable the endpoint completely.', 'lifterlms' ),
            'type'  => 'title',
        ),
        array(
            'title'    => __( 'View Grades', 'lifterlms' ),
            'desc'     => __( 'Student grade and progress reporting', 'lifterlms' ),
            'id'       => 'lifterlms_myaccount_grades_endpoint',
            'type'     => 'text',
            'default'  => 'my-grades',
            'sanitize' => 'slug',
        ),
        array(
            'title'    => __( 'View Courses', 'lifterlms' ),
            'desc'     => __( 'List of all the student\'s courses', 'lifterlms' ),
            'id'       => 'lifterlms_myaccount_courses_endpoint',
            'type'     => 'text',
            'default'  => 'my-courses',
            'sanitize' => 'slug',
        ),
        array(
            'title'    => __( 'View Memberships', 'lifterlms' ),
            'desc'     => __( 'List of all the student\'s memberships', 'lifterlms' ),
            'id'       => 'lifterlms_myaccount_memberships_endpoint',
            'type'     => 'text',
            'default'  => 'my-memberships',
            'sanitize' => 'slug',
        ),
        array(
            'title'    => __( 'View Achievements', 'lifterlms' ),
            'desc'     => __( 'List of all the student\'s achievements', 'lifterlms' ),
            'id'       => 'lifterlms_myaccount_achievements_endpoint',
            'type'     => 'text',
            'default'  => 'my-achievements',
            'sanitize' => 'slug',
        ),
        array(
            'title'    => __( 'View Certificates', 'lifterlms' ),
            'desc'     => __( 'List of all the student\'s certificates', 'lifterlms' ),
            'id'       => 'lifterlms_myaccount_certificates_endpoint',
            'type'     => 'text',
            'default'  => 'my-certificates',
            'sanitize' => 'slug',
        ),
 
        array(
            'title'    => __( 'Notifications', 'lifterlms' ),
            'desc'     => __( 'View Notifications and adjust notification settings', 'lifterlms' ),
            'id'       => 'lifterlms_myaccount_notifications_endpoint',
            'type'     => 'text',
            'default'  => 'notifications',
            'sanitize' => 'slug',
        ),
        array(
            'title'    => __( 'Edit Account', 'lifterlms' ),
            'desc'     => __( 'Edit Account page', 'lifterlms' ),
            'id'       => 'lifterlms_myaccount_edit_account_endpoint',
            'type'     => 'text',
            'default'  => 'edit-account',
            'sanitize' => 'slug',
        ),
        array(
            'title'    => __( 'Lost Password', 'lifterlms' ),
            'desc'     => __( 'Lost Password page', 'lifterlms' ),
            'id'       => 'lifterlms_myaccount_lost_password_endpoint',
            'type'     => 'text',
            'default'  => 'lost-password',
            'sanitize' => 'slug',
        ),
        array(
            'title'    => __( 'Redeem Vouchers', 'lifterlms' ),
            'desc'     => __( 'Redeem vouchers page', 'lifterlms' ),
            'id'       => 'lifterlms_myaccount_redeem_vouchers_endpoint',
            'type'     => 'text',
            'default'  => 'redeem-voucher',
            'sanitize' => 'slug',
        ),
        array(
            'title'    => __( 'Orders History', 'lifterlms' ),
            'desc'     => __( 'Students can review order history on this page', 'lifterlms' ),
            'id'       => 'lifterlms_myaccount_orders_endpoint',
            'type'     => 'text',
            'default'  => 'orders',
            'sanitize' => 'slug',
        ),
        array(
            'id'   => 'course_account_endpoint_options_end',
            'type' => 'sectionend',
        ),
 
        // Start user info fields options.
        array(
            'id'   => 'user_info_field_options',
            'type' => 'sectionstart',
        ),
        array(
            'title' => __( 'User Information & Privacy Options', 'lifterlms' ),
            'type'  => 'title',
            'id'    => 'user_info_field_options_title',
        ),
 
        array(
            'title' => __( 'User Information Field Settings', 'lifterlms' ),
            'type'  => 'subtitle',
            'desc'  => __( 'Since version 5.0, all user information fields are customized using the form editor.', 'lifterlms' ),
        ),
        array(
            'type'  => 'custom-html',
            'value' => '<p><a class="button-primary" href="' . admin_url( 'edit.php?post_type=llms_form' ) . '">' . __( 'Edit Forms', 'lifterlms' ) . '</a></p>',
        ),
 
        array(
            'title' => __( 'Terms and Conditions', 'lifterlms' ),
            'type'  => 'subtitle',
        ),
        array(
            'autoload'          => false,
            'default'           => 'no',
            'id'                => 'lifterlms_registration_require_agree_to_terms',
            'desc'              => __( 'When enabled users must agree to your site\'s Terms and Conditions to register for an account.', 'lifterlms' ),
            'title'             => __( 'Enable / Disable', 'lifterlms' ),
            'type'              => 'checkbox',
            'custom_attributes' => array(
                'class'         => 'llms-conditional-controller',
                'data-controls' => '#lifterlms_terms_page_id,#llms_terms_notice',
            ),
        ),
        array(
            'autoload'          => false,
            'desc'              => __( 'Select a page where your site\'s Terms and Conditions are described.', 'lifterlms' ),
            'id'                => 'lifterlms_terms_page_id',
            'default'           => '',
            'desc_tip'          => true,
            'class'             => 'llms-select2-post',
            'title'             => __( 'Terms and Conditions Page', 'lifterlms' ),
            'type'              => 'select',
            'custom_attributes' => array(
                'data-post-type'   => 'page',
                'data-placeholder' => __( 'Select a page', 'lifterlms' ),
            ),
            'options'           => llms_make_select2_post_array( get_option( 'lifterlms_terms_page_id', '' ) ),
        ),
        array(
            'autoload' => false,
            'default'  => llms_get_terms_notice(),
            'id'       => 'llms_terms_notice',
            'desc'     => __( 'Customize the text used to display the Terms and Conditions checkbox that students must accept.', 'lifterlms' ),
            'title'    => __( 'Terms and Conditions Notice', 'lifterlms' ),
            'type'     => 'textarea',
            'value'    => llms_get_terms_notice(),
        ),
        array(
            'title' => __( 'Privacy Policy', 'lifterlms' ),
            'type'  => 'subtitle',
        ),
        array(
            'autoload'          => false,
            'desc'              => sprintf(
                __( 'Select a page where your site\'s Privacy Policy is described. See %1$sWordPress Privacy Settings%2$s for more information', 'lifterlms' ),
                '<a href="' . esc_url( admin_url( 'privacy.php' ) ) . '">',
                '</a>'
            ),
            'id'                => 'wp_page_for_privacy_policy',
            'class'             => 'llms-select2-post',
            'title'             => __( 'Privacy Policy Page', 'lifterlms' ),
            'type'              => 'select',
            'custom_attributes' => array(
                'data-post-type'   => 'page',
                'data-placeholder' => __( 'Select a page', 'lifterlms' ),
            ),
            'options'           => llms_make_select2_post_array( get_option( 'wp_page_for_privacy_policy' ) ),
        ),
        array(
            'autoload' => false,
            'default'  => llms_get_privacy_notice(),
            'id'       => 'llms_privacy_notice',
            'desc'     => __( 'Optionally display a privacy policy notice during registration and checkout.', 'lifterlms' ),
            'title'    => __( 'Privacy Policy Notice', 'lifterlms' ),
            'type'     => 'textarea',
        ),
        array(
            'title' => __( 'Account Erasure Requests', 'lifterlms' ),
            /* Translators: %$1s = opening anchor to account erasure screen; %2$s closing anchor */
            'desc'  => sprintf( __( 'Customize data retention during %1$saccount erasure requests%2$s.', 'lifterlms' ), '<a href="' . esc_url( admin_url( 'tools.php?page=remove_personal_data' ) ) . '">', '</a>' ),
            'type'  => 'subtitle',
        ),
        array(
            'autoload' => false,
            'default'  => 'no',
            'id'       => 'llms_erasure_request_removes_order_data',
            'desc'     => __( 'When enabled orders will be anonymized during a personal data erasure.', 'lifterlms' ),
            'title'    => __( 'Remove Order Data', 'lifterlms' ),
            'type'     => 'checkbox',
        ),
        array(
            'autoload' => false,
            'default'  => 'no',
            'id'       => 'llms_erasure_request_removes_lms_data',
            'desc'     => __( 'When enabled all student data related to course and membership activities will be removed.', 'lifterlms' ),
            'title'    => __( 'Remove Student LMS Data', 'lifterlms' ),
            'type'     => 'checkbox',
        ),
        array(
            'id'   => 'user_info_field_options_end',
            'type' => 'sectionend',
        ),
 
    );
 
    if ( llms_is_favorites_enabled() ) {


Top ↑

Changelog Changelog

Changelog
Version Description
5.6.0 Added options to disable concurrent logins.
5.0.0 Removed field display settings. Reorganized open registration setting. Renamed "User Information Options" to "User Privacy Options".
3.37.3 Renamed duplicate field id for section close (user_info_field_options to user_info_field_options_end)
3.30.3 Fixed spelling errors.
1.0.0 Introduced.

Top ↑

User Contributed Notes User Contributed Notes

You must log in before being able to contribute a note or feedback.