| @@ -1,12 +1,12 @@ | ||
| 1 | 1 | <?php |
| 2 | 2 | /** |
| 3 | 3 | * @package FireBox |
| 4 | - * @version 1.0.2 Free | |
| 4 | + * @version 2.0.10 Free | |
| 5 | 5 | * |
| 6 | 6 | * @author FirePlugins <info@fireplugins.com> |
| 7 | 7 | * @link https://www.fireplugins.com |
| 8 | - * @copyright Copyright © 2021 FirePlugins All Rights Reserved | |
| 8 | + * @copyright Copyright © 2023 FirePlugins All Rights Reserved | |
| 9 | 9 | * @license GNU GPLv3 <http://www.gnu.org/licenses/gpl.html> or later |
| 10 | 10 | */ |
| 11 | 11 | |
| 12 | 12 | namespace FireBox\Core\Admin\Forms; |
| @@ -39,9 +39,9 @@ | ||
| 39 | 39 | 'license_key' => self::getLicenseKeySettings(), |
| 40 | 40 | ] |
| 41 | 41 | ]; |
| 42 | 42 | |
| 43 | - return apply_filters('firebox/settings/edit', $settings); | |
| 43 | + return apply_filters('firebox/forms/settings/edit', $settings); | |
| 44 | 44 | } |
| 45 | 45 | |
| 46 | 46 | /** |
| 47 | 47 | * Holds the General Settings |
| @@ -56,23 +56,23 @@ | ||
| 56 | 56 | // Media |
| 57 | 57 | 'media' => [ |
| 58 | 58 | 'title' => [ |
| 59 | 59 | 'title' => 'FPF_MEDIA', |
| 60 | - 'description' => 'FB_SETTINGS_MEDIA_DESC' | |
| 60 | + 'description' => firebox()->_('FB_SETTINGS_MEDIA_DESC') | |
| 61 | 61 | ], |
| 62 | 62 | 'fields' => [ |
| 63 | 63 | [ |
| 64 | 64 | 'name' => 'loadCSS', |
| 65 | 65 | 'type' => 'FPToggle', |
| 66 | - 'label' => 'FB_SETTINGS_LOAD_CSS', | |
| 67 | - 'description' => 'FB_SETTINGS_LOAD_CSS_DESC', | |
| 66 | + 'label' => firebox()->_('FB_SETTINGS_LOAD_CSS'), | |
| 67 | + 'description' => firebox()->_('FB_SETTINGS_LOAD_CSS_DESC'), | |
| 68 | 68 | 'checked' => true |
| 69 | 69 | ], |
| 70 | 70 | [ |
| 71 | 71 | 'name' => 'loadVelocity', |
| 72 | 72 | 'type' => 'FPToggle', |
| 73 | - 'label' => 'FB_SETTINGS_LOAD_VELOCITY', | |
| 74 | - 'description' => 'FB_SETTINGS_LOAD_VELOCITY_DESC', | |
| 73 | + 'label' => firebox()->_('FB_SETTINGS_LOAD_VELOCITY'), | |
| 74 | + 'description' => firebox()->_('FB_SETTINGS_LOAD_VELOCITY_DESC'), | |
| 75 | 75 | 'checked' => true |
| 76 | 76 | ] |
| 77 | 77 | ] |
| 78 | 78 | ], |
| @@ -79,23 +79,30 @@ | ||
| 79 | 79 | // Other |
| 80 | 80 | 'other' => [ |
| 81 | 81 | 'title' => [ |
| 82 | 82 | 'title' => 'FPF_OTHER', |
| 83 | - 'description' => 'FB_SETTINGS_OTHER_DESC' | |
| 83 | + 'description' => firebox()->_('FB_SETTINGS_OTHER_DESC') | |
| 84 | 84 | ], |
| 85 | 85 | 'fields' => [ |
| 86 | 86 | [ |
| 87 | + 'name' => 'show_admin_bar_menu_item', | |
| 88 | + 'type' => 'FPToggle', | |
| 89 | + 'label' => firebox()->_('FB_SETTINGS_SHOW_ADMIN_BAR_MENU_ITEM'), | |
| 90 | + 'description' => firebox()->_('FB_SETTINGS_SHOW_ADMIN_BAR_MENU_ITEM_DESC'), | |
| 91 | + 'checked' => true | |
| 92 | + ], | |
| 93 | + [ | |
| 87 | 94 | 'name' => 'showcopyright', |
| 88 | 95 | 'type' => 'FPToggle', |
| 89 | - 'label' => 'FB_SETTINGS_SHOW_COPYRIGHT', | |
| 90 | - 'description' => 'FB_SETTINGS_SHOW_COPYRIGHT_DESC', | |
| 96 | + 'label' => firebox()->_('FB_SETTINGS_SHOW_COPYRIGHT'), | |
| 97 | + 'description' => firebox()->_('FB_SETTINGS_SHOW_COPYRIGHT_DESC'), | |
| 91 | 98 | 'checked' => true |
| 92 | 99 | ], |
| 93 | 100 | [ |
| 94 | 101 | 'name' => 'debug', |
| 95 | 102 | 'type' => 'FPToggle', |
| 96 | - 'label' => 'FB_SETTINGS_DEBUG', | |
| 97 | - 'description' => 'FB_SETTINGS_DEBUG_DESC', | |
| 103 | + 'label' => firebox()->_('FB_SETTINGS_DEBUG'), | |
| 104 | + 'description' => firebox()->_('FB_SETTINGS_DEBUG_DESC'), | |
| 98 | 105 | ] |
| 99 | 106 | ] |
| 100 | 107 | ] |
| 101 | 108 | ] |
| @@ -114,10 +121,10 @@ | ||
| 114 | 121 | 'content' => [ |
| 115 | 122 | // Analytics |
| 116 | 123 | 'analytics' => [ |
| 117 | 124 | 'title' => [ |
| 118 | - 'title' => 'FB_SETTINGS_ANALYTICS', | |
| 119 | - 'description' => 'FB_SETTINGS_ANALYTICS_DESC' | |
| 125 | + 'title' => firebox()->_('FB_SETTINGS_ANALYTICS'), | |
| 126 | + 'description' => firebox()->_('FB_SETTINGS_ANALYTICS_DESC') | |
| 120 | 127 | ], |
| 121 | 128 | 'fields' => [ |
| 122 | 129 | [ |
| 123 | 130 | 'name' => 'stats', |
| @@ -126,11 +133,11 @@ | ||
| 126 | 133 | ], |
| 127 | 134 | [ |
| 128 | 135 | 'name' => 'statsdays', |
| 129 | 136 | 'type' => 'Dropdown', |
| 130 | - 'label' => 'FB_SETTINGS_STATS_PERIOD', | |
| 131 | - 'description' => 'FB_SETTINGS_STATS_PERIOD_DESC', | |
| 132 | - 'showon' => 'firebox_settings[stats]:1', | |
| 137 | + 'label' => firebox()->_('FB_SETTINGS_STATS_PERIOD'), | |
| 138 | + 'description' => firebox()->_('FB_SETTINGS_STATS_PERIOD_DESC'), | |
| 139 | + 'showon' => '[stats]:1', | |
| 133 | 140 | 'input_class' => ['small'], |
| 134 | 141 | 'default' => 180, |
| 135 | 142 | 'choices' => [ |
| 136 | 143 | 180 => fpframework()->_('FPF_6_MONTHS'), |
| @@ -142,16 +149,16 @@ | ||
| 142 | 149 | ], |
| 143 | 150 | [ |
| 144 | 151 | 'name' => 'statsdays_custom', |
| 145 | 152 | 'type' => 'Number', |
| 146 | - 'label' => 'FB_SETTINGS_STATS_DAYS_CUSTOM', | |
| 147 | - 'description' => 'FB_SETTINGS_STATS_DAYS_CUSTOM_DESC', | |
| 153 | + 'label' => firebox()->_('FB_SETTINGS_STATS_DAYS_CUSTOM'), | |
| 154 | + 'description' => firebox()->_('FB_SETTINGS_STATS_DAYS_CUSTOM_DESC'), | |
| 148 | 155 | 'placeholder' => 1, |
| 149 | 156 | 'min' => 1, |
| 150 | 157 | 'step' => 1, |
| 151 | 158 | 'addon' => 'days', |
| 152 | 159 | 'input_class' => ['small'], |
| 153 | - 'showon' => 'firebox_settings[stats]:1[AND]firebox_settings[statsdays]:custom', | |
| 160 | + 'showon' => '[stats]:1[AND][statsdays]:custom', | |
| 154 | 161 | ] |
| 155 | 162 | ] |
| 156 | 163 | ], |
| 157 | 164 | // Google Analytics |
| @@ -156,10 +163,10 @@ | ||
| 156 | 163 | ], |
| 157 | 164 | // Google Analytics |
| 158 | 165 | 'google_analytics' => [ |
| 159 | 166 | 'title' => [ |
| 160 | - 'title' => 'FB_SETTINGS_GAT', | |
| 161 | - 'description' => 'FB_SETTINGS_GAT_DESC' | |
| 167 | + 'title' => firebox()->_('FB_SETTINGS_GAT'), | |
| 168 | + 'description' => firebox()->_('FB_SETTINGS_GAT_DESC') | |
| 162 | 169 | ], |
| 163 | 170 | 'fields' => [ |
| 164 | 171 | |
| 165 | 172 | |
| @@ -164,12 +171,30 @@ | ||
| 164 | 171 | |
| 165 | 172 | |
| 166 | 173 | [ |
| 167 | 174 | 'type' => 'Pro', |
| 168 | - 'feature_label' => 'FB_SETTINGS_GAT' | |
| 175 | + 'plugin' => 'FireBox', | |
| 176 | + 'feature_label' => firebox()->_('FB_SETTINGS_GAT') | |
| 169 | 177 | ] |
| 170 | 178 | |
| 171 | 179 | ] |
| 180 | + ], | |
| 181 | + // API Key | |
| 182 | + 'api' => [ | |
| 183 | + 'title' => [ | |
| 184 | + 'title' => firebox()->_('FB_JSON_API'), | |
| 185 | + 'description' => firebox()->_('FB_JSON_API_DESC') | |
| 186 | + ], | |
| 187 | + 'fields' => [ | |
| 188 | + | |
| 189 | + | |
| 190 | + [ | |
| 191 | + 'type' => 'Pro', | |
| 192 | + 'plugin' => 'FireBox', | |
| 193 | + 'feature_label' => firebox()->_('FB_JSON_API') | |
| 194 | + ] | |
| 195 | + | |
| 196 | + ] | |
| 172 | 197 | ] |
| 173 | 198 | ] |
| 174 | 199 | ]; |
| 175 | 200 | } |
| @@ -194,8 +219,9 @@ | ||
| 194 | 219 | |
| 195 | 220 | |
| 196 | 221 | [ |
| 197 | 222 | 'type' => 'Pro', |
| 223 | + 'plugin' => 'FireBox', | |
| 198 | 224 | 'feature_label' => 'FPF_GEOLOCATION_SERVICES' |
| 199 | 225 | ] |
| 200 | 226 | |
| 201 | 227 | ] |
| @@ -210,8 +236,9 @@ | ||
| 210 | 236 | |
| 211 | 237 | |
| 212 | 238 | [ |
| 213 | 239 | 'type' => 'Pro', |
| 240 | + 'plugin' => 'FireBox', | |
| 214 | 241 | 'feature_label' => 'FPF_GEOIP_LOOKUP' |
| 215 | 242 | ] |
| 216 | 243 | |
| 217 | 244 | ] |
| @@ -256,16 +283,16 @@ | ||
| 256 | 283 | * @return array |
| 257 | 284 | */ |
| 258 | 285 | private static function getLicenseKeySettings() |
| 259 | 286 | { |
| 260 | - $plugin_name = firebox()->_('FB_PLUGIN_NAME'); | |
| 287 | + $plugin_name = firebox()->_(firebox()->_('FB_PLUGIN_NAME')); | |
| 261 | 288 | |
| 262 | 289 | $status = ''; |
| 263 | 290 | $status_prefix = 'You\'re using ' . $plugin_name . ' ' . ucfirst(FBOX_LICENSE_TYPE) . ' - '; |
| 264 | - $enjoy = 'Enjoy! <img role="img" class="emoji" alt="🙂" src="https://s.w.org/images/core/emoji/13.0.0/svg/1f642.svg" />'; | |
| 291 | + $enjoy = fpframework()->_('FPF_ENJOY') . '! <img role="img" class="emoji" alt="🙂" src="https://s.w.org/images/core/emoji/13.0.0/svg/1f642.svg" />'; | |
| 265 | 292 | |
| 266 | 293 | |
| 267 | - $status = $status_prefix . 'No license needed. ' . $enjoy; | |
| 294 | + $status = $status_prefix . fpframework()->_('FPF_NO_LICENSE_NEEDED') . ' ' . $enjoy; | |
| 268 | 295 | |
| 269 | 296 | |
| 270 | 297 | |
| 271 | 298 | |
| @@ -282,8 +309,9 @@ | ||
| 282 | 309 | |
| 283 | 310 | |
| 284 | 311 | [ |
| 285 | 312 | 'type' => 'Pro', |
| 313 | + 'plugin' => 'FireBox', | |
| 286 | 314 | 'feature_label' => 'FPF_ACTIVATE_LICENSE' |
| 287 | 315 | ] |
| 288 | 316 | |
| 289 | 317 | ] |