PluginProbe
LearnPress – WordPress LMS Plugin for Create and Sell Online Courses / 4.4.8
LearnPress – WordPress LMS Plugin for Create and Sell Online Courses v4.4.8
4.4.8 4.4.7 4.4.6 4.4.5 4.4.4 4.4.3 4.4.2 4.4.1 4.4.0 4.3.9.1 4.3.9 4.3.8 4.3.7 4.1.6.9 4.1.6.9.1 4.1.6.9.2 4.1.6.9.3 4.1.6.9.4 4.1.7 4.1.7.1 4.1.7.2 4.1.7.3 4.1.7.3.1 4.1.7.3.2 4.2.0 All 139 releases
← All changes | config/settings/general.php +50 -9 4.1.7.3.14.4.8 View file →
@@ -2,11 +2,17 @@
2 2 $currencies = learn_press_currencies();
3 3
4 4 foreach ( $currencies as $code => $name ) {
5 5 $currency_symbol = learn_press_get_currency_symbol( $code );
6 - $currencies[ $code ] = sprintf( '%s (%s)', $name, $currency_symbol );
6 + $currencies[ $code ] = sprintf( '%s (%s) - %s', $name, $currency_symbol, $code );
7 7 }
8 8
9 +$data_struct_currency = [
10 + 'setting' => [
11 + 'plugins' => [],
12 + ],
13 +];
14 +
9 15 return apply_filters(
10 16 'learn-press/general-settings-fields',
11 17 array(
12 18 array(
@@ -17,14 +23,30 @@
17 23 'title' => esc_html__( 'All courses page', 'learnpress' ),
18 24 'id' => 'courses_page_id',
19 25 'default' => '',
20 26 'type' => 'pages-dropdown',
27 + 'value' => learn_press_get_page_id( 'courses' ),
21 28 ),
22 29 array(
30 + 'title' => esc_html__( 'All instructors page', 'learnpress' ),
31 + 'id' => 'instructors_page_id',
32 + 'default' => '',
33 + 'type' => 'pages-dropdown',
34 + 'value' => learn_press_get_page_id( 'instructors' ),
35 + ),
36 + array(
37 + 'title' => esc_html__( 'Single instructor page', 'learnpress' ),
38 + 'id' => 'single_instructor_page_id',
39 + 'default' => '',
40 + 'type' => 'pages-dropdown',
41 + 'value' => learn_press_get_page_id( 'single_instructor' ),
42 + ),
43 + array(
23 44 'title' => esc_html__( 'Profile page', 'learnpress' ),
24 45 'id' => 'profile_page_id',
25 46 'default' => '',
26 47 'type' => 'pages-dropdown',
48 + 'value' => learn_press_get_page_id( 'profile' ),
27 49 ),
28 50 array(
29 51 'title' => esc_html__( 'Checkout page', 'learnpress' ),
30 52 'id' => 'checkout_page_id',
@@ -29,20 +51,23 @@
29 51 'title' => esc_html__( 'Checkout page', 'learnpress' ),
30 52 'id' => 'checkout_page_id',
31 53 'default' => '',
32 54 'type' => 'pages-dropdown',
55 + 'value' => learn_press_get_page_id( 'checkout' ),
33 56 ),
34 57 array(
35 - 'title' => esc_html__( 'Become instructors page', 'learnpress' ),
58 + 'title' => esc_html__( 'Become an instructors page', 'learnpress' ),
36 59 'id' => 'become_a_teacher_page_id',
37 60 'default' => '',
38 61 'type' => 'pages-dropdown',
62 + 'value' => learn_press_get_page_id( 'become_a_teacher' ),
39 63 ),
40 64 array(
41 - 'title' => esc_html__( 'Terms and conditions', 'learnpress' ),
65 + 'title' => esc_html__( 'Terms and conditions page', 'learnpress' ),
42 66 'id' => 'term_conditions_page_id',
43 67 'default' => '',
44 68 'type' => 'pages-dropdown',
69 + 'value' => learn_press_get_page_id( 'term_conditions' ),
45 70 ),
46 71 array(
47 72 'title' => esc_html__( 'Logout Redirect', 'learnpress' ),
48 73 'id' => 'logout_redirect_page_id',
@@ -48,8 +73,9 @@
48 73 'id' => 'logout_redirect_page_id',
49 74 'default' => '',
50 75 'type' => 'pages-dropdown',
51 76 'desc' => __( 'The page where the user will be redirected to after logging out.', 'learnpress' ),
77 + 'value' => learn_press_get_page_id( 'logout_redirect' ),
52 78 ),
53 79 array(
54 80 'type' => 'sectionend',
55 81 ),
@@ -58,14 +84,15 @@
58 84 'type' => 'title',
59 85 'desc' => esc_html__( 'Setting up your currency unit and its formatting.', 'learnpress' ),
60 86 ),
61 87 array(
62 - 'title' => esc_html__( 'Currency', 'learnpress' ),
63 - 'id' => 'currency',
64 - 'default' => 'USD',
65 - 'type' => 'select',
66 - 'class' => 'lp-select-2',
67 - 'options' => $currencies,
88 + 'title' => esc_html__( 'Currency', 'learnpress' ),
89 + 'id' => 'currency',
90 + 'default' => 'USD',
91 + 'type' => 'select',
92 + 'class' => 'lp-tom-select',
93 + 'custom_attributes' => [ 'data-struct' => htmlentities2( json_encode( $data_struct_currency ) ) ],
94 + 'options' => $currencies,
68 95 ),
69 96 array(
70 97 'title' => esc_html__( 'Currency position', 'learnpress' ),
71 98 'desc_tip' => esc_html__( 'This controls the position of the currency symbol.', 'learnpress' ),
@@ -113,11 +140,25 @@
113 140 'desc_tip' => esc_html__( 'This option will add a sub-item \"Privacy\" under the Setting tab on the Profile page. If users want to publish or hide their course, or quiz tab when other users visit their profile page, they need to enable/disable that option in the Privacy section.', 'learnpress' ),
114 141 'desc' => __( 'Public all user profile pages (only the overview tab).', 'learnpress' ),
115 142 ),
116 143 array(
144 + 'title' => esc_html__( 'Redirect Instructors to Course Builder', 'learnpress' ),
145 + 'desc' => esc_html__( 'When enabled, Instructors will be redirected to Course Builder when trying to access wp-admin. Administrators are not affected.', 'learnpress' ),
146 + 'id' => 'hide_instructor_access_admin_screen',
147 + 'default' => 'no',
148 + 'type' => 'checkbox',
149 + ),
150 + array(
117 151 'title' => esc_html__( 'Instructor registration', 'learnpress' ),
118 152 'desc' => esc_html__( 'Enable the option in all registration forms.', 'learnpress' ),
119 153 'id' => 'instructor_registration',
154 + 'default' => 'no',
155 + 'type' => 'checkbox',
156 + ),
157 + array(
158 + 'title' => esc_html__( 'Store IP Guest to handle checkout', 'learnpress' ),
159 + 'desc' => esc_html__( 'Enable the option, IP of client is identifier user instead $_COOKIE', 'learnpress' ),
160 + 'id' => 'store_ip_customer_session',
120 161 'default' => 'no',
121 162 'type' => 'checkbox',
122 163 ),
123 164 array(