| 1 |
<?php |
| 2 |
$currencies = learn_press_currencies(); |
| 3 |
|
| 4 |
foreach ( $currencies as $code => $name ) { |
| 5 |
$currency_symbol = learn_press_get_currency_symbol( $code ); |
| 6 |
$currencies[ $code ] = sprintf( '%s (%s)', $name, $currency_symbol ); |
| 7 |
} |
| 8 |
|
| 9 |
return apply_filters( |
| 10 |
'learn-press/general-settings-fields', |
| 11 |
array( |
| 12 |
array( |
| 13 |
'title' => esc_html__( 'Pages setup', 'learnpress' ), |
| 14 |
'type' => 'title', |
| 15 |
), |
| 16 |
array( |
| 17 |
'title' => esc_html__( 'All courses page', 'learnpress' ), |
| 18 |
'id' => 'courses_page_id', |
| 19 |
'default' => '', |
| 20 |
'type' => 'pages-dropdown', |
| 21 |
), |
| 22 |
array( |
| 23 |
'title' => esc_html__( 'Profile page', 'learnpress' ), |
| 24 |
'id' => 'profile_page_id', |
| 25 |
'default' => '', |
| 26 |
'type' => 'pages-dropdown', |
| 27 |
), |
| 28 |
array( |
| 29 |
'title' => esc_html__( 'Checkout page', 'learnpress' ), |
| 30 |
'id' => 'checkout_page_id', |
| 31 |
'default' => '', |
| 32 |
'type' => 'pages-dropdown', |
| 33 |
), |
| 34 |
array( |
| 35 |
'title' => esc_html__( 'Become instructors page', 'learnpress' ), |
| 36 |
'id' => 'become_a_teacher_page_id', |
| 37 |
'default' => '', |
| 38 |
'type' => 'pages-dropdown', |
| 39 |
), |
| 40 |
array( |
| 41 |
'title' => esc_html__( 'Terms and conditions', 'learnpress' ), |
| 42 |
'id' => 'term_conditions_page_id', |
| 43 |
'default' => '', |
| 44 |
'type' => 'pages-dropdown', |
| 45 |
), |
| 46 |
array( |
| 47 |
'title' => esc_html__( 'Logout Redirect', 'learnpress' ), |
| 48 |
'id' => 'logout_redirect_page_id', |
| 49 |
'default' => '', |
| 50 |
'type' => 'pages-dropdown', |
| 51 |
'desc' => __( 'The page where user will be redirected to after logging out.', 'learnpress' ), |
| 52 |
), |
| 53 |
array( |
| 54 |
'type' => 'sectionend', |
| 55 |
), |
| 56 |
array( |
| 57 |
'title' => esc_html__( 'Currency', 'learnpress' ), |
| 58 |
'type' => 'title', |
| 59 |
'desc' => esc_html__( 'Setting up your currency unit and its formatting.', 'learnpress' ), |
| 60 |
), |
| 61 |
array( |
| 62 |
'title' => esc_html__( 'Currency', 'learnpress' ), |
| 63 |
'id' => 'currency', |
| 64 |
'default' => 'USD', |
| 65 |
'type' => 'select', |
| 66 |
'class' => 'lp-select-2', |
| 67 |
'options' => $currencies, |
| 68 |
), |
| 69 |
array( |
| 70 |
'title' => esc_html__( 'Currency position', 'learnpress' ), |
| 71 |
'desc_tip' => esc_html__( 'This controls the position of the currency symbol.', 'learnpress' ), |
| 72 |
'id' => 'currency_pos', |
| 73 |
'default' => 'left', |
| 74 |
'type' => 'select', |
| 75 |
'options' => learn_press_currency_positions(), |
| 76 |
), |
| 77 |
array( |
| 78 |
'title' => esc_html__( 'Thousands separator', 'learnpress' ), |
| 79 |
'desc_tip' => esc_html__( 'This sets the thousand separator of displayed prices.', 'learnpress' ), |
| 80 |
'id' => 'thousands_separator', |
| 81 |
'default' => ',', |
| 82 |
'type' => 'text', |
| 83 |
'css' => 'min-width: 50px; width: 50px;', |
| 84 |
), |
| 85 |
array( |
| 86 |
'title' => esc_html__( 'Decimals separator', 'learnpress' ), |
| 87 |
'desc_tip' => esc_html__( 'This sets the decimal separator of displayed prices.', 'learnpress' ), |
| 88 |
'id' => 'decimals_separator', |
| 89 |
'default' => '.', |
| 90 |
'type' => 'text', |
| 91 |
'css' => 'min-width: 50px; width: 50px;', |
| 92 |
), |
| 93 |
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' ), |
| 96 |
'id' => 'number_of_decimals', |
| 97 |
'default' => '2', |
| 98 |
'type' => 'number', |
| 99 |
'css' => 'width: 50px;', |
| 100 |
), |
| 101 |
array( |
| 102 |
'type' => 'sectionend', |
| 103 |
), |
| 104 |
array( |
| 105 |
'title' => esc_html__( 'Other', 'learnpress' ), |
| 106 |
'type' => 'title', |
| 107 |
), |
| 108 |
array( |
| 109 |
'title' => esc_html__( 'Publish profile', 'learnpress' ), |
| 110 |
'id' => 'publish_profile', |
| 111 |
'default' => 'no', |
| 112 |
'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' ), |
| 115 |
), |
| 116 |
array( |
| 117 |
'title' => esc_html__( 'Instructor registration', 'learnpress' ), |
| 118 |
'desc' => esc_html__( 'Enable the option in all registration forms.', 'learnpress' ), |
| 119 |
'id' => 'instructor_registration', |
| 120 |
'default' => 'no', |
| 121 |
'type' => 'checkbox', |
| 122 |
), |
| 123 |
array( |
| 124 |
'type' => 'sectionend', |
| 125 |
), |
| 126 |
) |
| 127 |
); |
| 128 |
|