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 +57 -16 4.1.74.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',
@@ -47,9 +72,10 @@
47 72 'title' => esc_html__( 'Logout Redirect', 'learnpress' ),
48 73 'id' => 'logout_redirect_page_id',
49 74 'default' => '',
50 75 'type' => 'pages-dropdown',
51 - 'desc' => __( 'The page where user will be redirected to after logging out.', 'learnpress' ),
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' ),
@@ -75,9 +102,9 @@
75 102 'options' => learn_press_currency_positions(),
76 103 ),
77 104 array(
78 105 'title' => esc_html__( 'Thousands separator', 'learnpress' ),
79 - 'desc_tip' => esc_html__( 'This sets the thousand separator of displayed prices.', 'learnpress' ),
106 + 'desc_tip' => esc_html__( 'This sets the thousands separator of displayed prices.', 'learnpress' ),
80 107 'id' => 'thousands_separator',
81 108 'default' => ',',
82 109 'type' => 'text',
83 110 'css' => 'min-width: 50px; width: 50px;',
@@ -82,9 +109,9 @@
82 109 'type' => 'text',
83 110 'css' => 'min-width: 50px; width: 50px;',
84 111 ),
85 112 array(
86 - 'title' => esc_html__( 'Decimals separator', 'learnpress' ),
113 + 'title' => esc_html__( 'Decimal separator', 'learnpress' ),
87 114 'desc_tip' => esc_html__( 'This sets the decimal separator of displayed prices.', 'learnpress' ),
88 115 'id' => 'decimals_separator',
89 116 'default' => '.',
90 117 'type' => 'text',
@@ -90,10 +117,10 @@
90 117 'type' => 'text',
91 118 'css' => 'min-width: 50px; width: 50px;',
92 119 ),
93 120 array(
94 - 'title' => esc_html__( 'Number of decimals', 'learnpress' ),
95 - 'desc_tip' => esc_html__( 'This sets the number of decimal points shown in displayed prices.', 'learnpress' ),
121 + 'title' => esc_html__( 'The number of decimals', 'learnpress' ),
122 + 'desc_tip' => esc_html__( 'This sets the number of decimal points shown in the displayed prices.', 'learnpress' ),
96 123 'id' => 'number_of_decimals',
97 124 'default' => '2',
98 125 'type' => 'number',
99 126 'css' => 'width: 50px;',
@@ -109,15 +136,29 @@
109 136 'title' => esc_html__( 'Publish profile', 'learnpress' ),
110 137 'id' => 'publish_profile',
111 138 'default' => 'no',
112 139 'type' => 'checkbox',
113 - 'desc_tip' => esc_html__( 'This option will add a sub-item "Privacy" under Setting tab on the Profile page. If users want to publish or hide their course, quiz tab when other users visit their profile page, they need to enable/disable that option in the Privacy section.', 'learnpress' ),
114 - 'desc' => __( 'Public all user profile page (Overview tab only).', 'learnpress' ),
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' ),
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(