| 1 |
<?php |
| 2 |
/** |
| 3 |
* WPPIZZA_MODULE_LOCALIZATION_COMMON Class |
| 4 |
* |
| 5 |
* @package WPPIZZA |
| 6 |
* @subpackage WPPIZZA_MODULE_LOCALIZATION_COMMON |
| 7 |
* @copyright Copyright (c) 2015, Oliver Bach |
| 8 |
* @license http://opensource.org/licenses/gpl-2.0.php GNU Public License |
| 9 |
* @since 3.0 |
| 10 |
* |
| 11 |
*/ |
| 12 |
if ( ! defined( 'ABSPATH' ) ) exit;/*Exit if accessed directly*/ |
| 13 |
|
| 14 |
|
| 15 |
/************************************************************************************************************************ |
| 16 |
* |
| 17 |
* |
| 18 |
* |
| 19 |
* |
| 20 |
* |
| 21 |
* |
| 22 |
************************************************************************************************************************/ |
| 23 |
class WPPIZZA_MODULE_LOCALIZATION_COMMON{ |
| 24 |
|
| 25 |
private $settings_page = 'localization';/* which admin subpage (identified there by this->class_key) are we adding this to */ |
| 26 |
|
| 27 |
private $section_key = 'common';/* must be unique */ |
| 28 |
|
| 29 |
|
| 30 |
function __construct() { |
| 31 |
/********************************************************** |
| 32 |
[add settings to admin] |
| 33 |
***********************************************************/ |
| 34 |
if(is_admin()){ |
| 35 |
/* add admin options settings page*/ |
| 36 |
add_filter('wppizza_filter_settings_sections_'.$this->settings_page.'', array($this, 'admin_localization_help'), 10, 5); |
| 37 |
add_filter('wppizza_filter_settings_sections_'.$this->settings_page.'', array($this, 'admin_localization_order_labels'), 10, 5); |
| 38 |
add_filter('wppizza_filter_settings_sections_'.$this->settings_page.'', array($this, 'admin_localization_order_values'), 20, 5); |
| 39 |
add_filter('wppizza_filter_settings_sections_'.$this->settings_page.'', array($this, 'admin_localization_user_purchase_history'), 30, 5); |
| 40 |
add_filter('wppizza_filter_settings_sections_'.$this->settings_page.'', array($this, 'admin_localization_discounts'), 40, 5); |
| 41 |
add_filter('wppizza_filter_settings_sections_'.$this->settings_page.'', array($this, 'admin_localization_menu_item'), 50, 5); |
| 42 |
add_filter('wppizza_filter_settings_sections_'.$this->settings_page.'', array($this, 'admin_localization_pagination'), 60, 5); |
| 43 |
add_filter('wppizza_filter_settings_sections_'.$this->settings_page.'', array($this, 'admin_localization_openinghours'), 70, 5); |
| 44 |
// add_filter('wppizza_filter_settings_sections_'.$this->settings_page.'', array($this, 'admin_localization_email'), 80, 5); |
| 45 |
add_filter('wppizza_filter_settings_sections_'.$this->settings_page.'', array($this, 'admin_localization_orderpage'), 90, 5); |
| 46 |
add_filter('wppizza_filter_settings_sections_'.$this->settings_page.'', array($this, 'admin_localization_labels_itemised'), 100, 5); |
| 47 |
add_filter('wppizza_filter_settings_sections_'.$this->settings_page.'', array($this, 'admin_localization_price_labels_subtotals'), 110, 5); |
| 48 |
add_filter('wppizza_filter_settings_sections_'.$this->settings_page.'', array($this, 'admin_localization_cart'), 120, 5); |
| 49 |
add_filter('wppizza_filter_settings_sections_'.$this->settings_page.'', array($this, 'admin_localization_print_order_admin'), 130, 5); |
| 50 |
add_filter('wppizza_filter_settings_sections_'.$this->settings_page.'', array($this, 'admin_localization_template'), 140, 5); |
| 51 |
add_filter('wppizza_filter_settings_sections_'.$this->settings_page.'', array($this, 'admin_localization_gateways'), 150, 5); |
| 52 |
add_filter('wppizza_filter_settings_sections_'.$this->settings_page.'', array($this, 'admin_localization_widgets'), 160, 5); |
| 53 |
add_filter('wppizza_filter_settings_sections_'.$this->settings_page.'', array($this, 'admin_localization_user_profile'), 170, 5); |
| 54 |
add_filter('wppizza_filter_settings_sections_'.$this->settings_page.'', array($this, 'admin_localization_miscellaneous'), 180, 5); |
| 55 |
add_filter('wppizza_filter_settings_sections_'.$this->settings_page.'', array($this, 'admin_localization_admin_orderhistory_statuses'), 190, 5); |
| 56 |
add_filter('wppizza_filter_settings_sections_'.$this->settings_page.'', array($this, 'admin_localization_admin_orderhistory_custom'), 200, 5); |
| 57 |
|
| 58 |
/* add admin options settings page fields */ |
| 59 |
// add_action('wppizza_admin_settings_section_fields_'.$this->settings_page.'', array($this, 'admin_options_fields_settings'), 10, 5); |
| 60 |
/**add default options **/ |
| 61 |
add_filter('wppizza_filter_setup_default_options', array( $this, 'options_default')); |
| 62 |
|
| 63 |
/**validate options**/ |
| 64 |
//add_filter('wppizza_filter_localization_validate', array( $this, 'options_validate')); |
| 65 |
/**validate string as html**/ |
| 66 |
add_filter('wppizza_filter_localization_html', array( $this, 'options_validate_as_html')); |
| 67 |
} |
| 68 |
} |
| 69 |
|
| 70 |
/******************************************************************************************************************************************************* |
| 71 |
* |
| 72 |
* |
| 73 |
* |
| 74 |
* [frontend filters] |
| 75 |
* |
| 76 |
* |
| 77 |
* |
| 78 |
********************************************************************************************************************************************************/ |
| 79 |
|
| 80 |
|
| 81 |
|
| 82 |
/******************************************************************************************************************************************************* |
| 83 |
* |
| 84 |
* |
| 85 |
* |
| 86 |
* [add admin page options] |
| 87 |
* |
| 88 |
* |
| 89 |
* |
| 90 |
********************************************************************************************************************************************************/ |
| 91 |
|
| 92 |
/*------------------------------------------------------------------------------ |
| 93 |
# |
| 94 |
# |
| 95 |
# [settings page] |
| 96 |
# |
| 97 |
# |
| 98 |
------------------------------------------------------------------------------*/ |
| 99 |
|
| 100 |
/*------------------------------------------------------------------------------ |
| 101 |
# [settings section - setting page] |
| 102 |
# @since 3.0 |
| 103 |
# @return array() |
| 104 |
------------------------------------------------------------------------------*/ |
| 105 |
function admin_localization_help($settings, $sections, $fields, $inputs, $help){ |
| 106 |
|
| 107 |
$section_key = 'localization_help'; |
| 108 |
/*sections*/ |
| 109 |
if($sections){ |
| 110 |
$settings['sections'][$section_key] = __('Localization', 'wppizza-admin'); |
| 111 |
} |
| 112 |
/*help*/ |
| 113 |
if($help){ |
| 114 |
$settings['help'][$section_key][] = array( |
| 115 |
'label'=>__('Manage Localization', 'wppizza-admin'), |
| 116 |
'description'=>array( |
| 117 |
__('Adjust / edit all your *frontend* localization strings using the form fields below according to your needs.', 'wppizza-admin'), |
| 118 |
__('Although defaults entered here will be in english if no language file for your particular language exists yet, you can nevertheless use the fields below to translate your frontend into *any* language.', 'wppizza-admin'), |
| 119 |
__('Any edits you make will be kept on future plugin updates / upgrades.', 'wppizza-admin'), |
| 120 |
__('<b>Order History - Order Statuses</b>: only non empty fields will be available for selection in the admin order history page. Therefore, if there are more than you need, just empty the relevant field or if you need more, enter them in the custom fields.', 'wppizza-admin'), |
| 121 |
__('<b>Order History - Custom Statuses</b>: if you need an additional dropdown selection (for example for drivers that have delivered a particular order), enter a label and comma separated list (of drivers names for example)', 'wppizza-admin'), |
| 122 |
'<b>'.__('Note: localization strings for the confirmation form - if used / enabled - can be found in "Order Form Settings"', 'wppizza-admin').'</b>' |
| 123 |
) |
| 124 |
); |
| 125 |
} |
| 126 |
return $settings; |
| 127 |
} |
| 128 |
|
| 129 |
/******************************** |
| 130 |
* [Common [Order Labels]] |
| 131 |
********************************/ |
| 132 |
function admin_localization_order_labels($settings, $sections, $fields, $inputs, $help){ |
| 133 |
|
| 134 |
$section_key = 'order_labels'; |
| 135 |
|
| 136 |
/*sections*/ |
| 137 |
if($sections){ |
| 138 |
$settings['sections'][$section_key] = __('Common [Order Labels]', 'wppizza-admin'); |
| 139 |
} |
| 140 |
|
| 141 |
/*fields*/ |
| 142 |
if($fields){ |
| 143 |
|
| 144 |
$field = 'common_label_order_order_date'; |
| 145 |
$settings['fields'][$section_key][$field] = array( '', array( |
| 146 |
'value_key'=>$field, |
| 147 |
'option_key'=>$this->settings_page, |
| 148 |
'label'=>__('Order Date', 'wppizza-admin'), |
| 149 |
'description'=>array() |
| 150 |
)); |
| 151 |
$field = 'common_label_order_order_id'; |
| 152 |
$settings['fields'][$section_key][$field] = array( '', array( |
| 153 |
'value_key'=>$field, |
| 154 |
'option_key'=>$this->settings_page, |
| 155 |
'label'=>__('Order ID', 'wppizza-admin'), |
| 156 |
'description'=>array() |
| 157 |
)); |
| 158 |
$field = 'common_label_order_payment_outstanding'; |
| 159 |
$settings['fields'][$section_key][$field] = array( '', array( |
| 160 |
'value_key'=>$field, |
| 161 |
'option_key'=>$this->settings_page, |
| 162 |
'label'=>__('Payment Due', 'wppizza-admin'), |
| 163 |
'description'=>array() |
| 164 |
)); |
| 165 |
|
| 166 |
$field = 'common_label_order_payment_unconfirmed'; |
| 167 |
$settings['fields'][$section_key][$field] = array( '', array( |
| 168 |
'value_key'=>$field, |
| 169 |
'option_key'=>$this->settings_page, |
| 170 |
'label'=>__('Unconfirmed Payment', 'wppizza-admin'), |
| 171 |
'description'=>array() |
| 172 |
)); |
| 173 |
|
| 174 |
$field = 'common_label_order_payment_confirmed'; |
| 175 |
$settings['fields'][$section_key][$field] = array( '', array( |
| 176 |
'value_key'=>$field, |
| 177 |
'option_key'=>$this->settings_page, |
| 178 |
'label'=>__('Confirmed Payment', 'wppizza-admin'), |
| 179 |
'description'=>array() |
| 180 |
)); |
| 181 |
|
| 182 |
$field = 'common_label_order_delivery_type'; |
| 183 |
$settings['fields'][$section_key][$field] = array( '', array( |
| 184 |
'value_key'=>$field, |
| 185 |
'option_key'=>$this->settings_page, |
| 186 |
'label'=>__('Delivery Type', 'wppizza-admin'), |
| 187 |
'description'=>array() |
| 188 |
)); |
| 189 |
$field = 'common_label_order_payment_type'; |
| 190 |
$settings['fields'][$section_key][$field] = array( '', array( |
| 191 |
'value_key'=>$field, |
| 192 |
'option_key'=>$this->settings_page, |
| 193 |
'label'=>__('Payment Type', 'wppizza-admin'), |
| 194 |
'description'=>array() |
| 195 |
)); |
| 196 |
$field = 'common_label_order_payment_method'; |
| 197 |
$settings['fields'][$section_key][$field] = array( '', array( |
| 198 |
'value_key'=>$field, |
| 199 |
'option_key'=>$this->settings_page, |
| 200 |
'label'=>__('Payment Method (i.e Cash or CC)', 'wppizza-admin'), |
| 201 |
'description'=>array() |
| 202 |
)); |
| 203 |
//$field = 'order_paid_by'; |
| 204 |
//$settings['fields'][$section_key][$field] = array( '', array( |
| 205 |
// 'value_key'=>$field, |
| 206 |
// 'option_key'=>$this->settings_page, |
| 207 |
// 'label'=>__('how was order paid for', 'wppizza-admin') |
| 208 |
//)); |
| 209 |
$field = 'common_label_order_transaction_id'; |
| 210 |
$settings['fields'][$section_key][$field] = array( '', array( |
| 211 |
'value_key'=>$field, |
| 212 |
'option_key'=>$this->settings_page, |
| 213 |
'label'=>__('Transaction ID', 'wppizza-admin'), |
| 214 |
'description'=>array() |
| 215 |
)); |
| 216 |
$field = 'common_label_order_total'; |
| 217 |
$settings['fields'][$section_key][$field] = array( '', array( |
| 218 |
'value_key'=>$field, |
| 219 |
'option_key'=>$this->settings_page, |
| 220 |
'label'=>__('Total', 'wppizza-admin'), |
| 221 |
'description'=>array() |
| 222 |
)); |
| 223 |
$field = 'common_label_order_refund'; |
| 224 |
$settings['fields'][$section_key][$field] = array( '', array( |
| 225 |
'value_key'=>$field, |
| 226 |
'option_key'=>$this->settings_page, |
| 227 |
'label'=>__('Refunded', 'wppizza-admin'), |
| 228 |
'description'=>array() |
| 229 |
)); |
| 230 |
$field = 'common_label_order_delivery_pickup_note'; |
| 231 |
$settings['fields'][$section_key][$field] = array( '', array( |
| 232 |
'value_key'=>$field, |
| 233 |
'option_key'=>$this->settings_page, |
| 234 |
'label'=>__('Delivery / Pickup note', 'wppizza-admin'), |
| 235 |
'description'=>array() |
| 236 |
)); |
| 237 |
|
| 238 |
$field = 'common_label_order_wp_user_id'; |
| 239 |
$settings['fields'][$section_key][$field] = array( '', array( |
| 240 |
'value_key'=>$field, |
| 241 |
'option_key'=>$this->settings_page, |
| 242 |
'label'=>__('User ID', 'wppizza-admin'), |
| 243 |
'description'=>array(__('[currently unused]', 'wppizza-admin')) |
| 244 |
)); |
| 245 |
$field = 'common_label_order_currency'; |
| 246 |
$settings['fields'][$section_key][$field] = array( '', array( |
| 247 |
'value_key'=>$field, |
| 248 |
'option_key'=>$this->settings_page, |
| 249 |
'label'=>__('Currency', 'wppizza-admin'), |
| 250 |
'description'=>array(__('[currently unused]', 'wppizza-admin')) |
| 251 |
)); |
| 252 |
} |
| 253 |
|
| 254 |
return $settings; |
| 255 |
} |
| 256 |
|
| 257 |
/******************************** |
| 258 |
* [Common [Order Values]] |
| 259 |
********************************/ |
| 260 |
function admin_localization_order_values($settings, $sections, $fields, $inputs, $help){ |
| 261 |
|
| 262 |
$section_key = 'order_values'; |
| 263 |
|
| 264 |
/*sections*/ |
| 265 |
if($sections){ |
| 266 |
$settings['sections'][$section_key] = __('Common [Order Values]', 'wppizza-admin'); |
| 267 |
} |
| 268 |
/*fields*/ |
| 269 |
if($fields){ |
| 270 |
$field = 'common_value_order_delivery'; |
| 271 |
$settings['fields'][$section_key][$field] = array( '', array( |
| 272 |
'value_key'=>$field, |
| 273 |
'option_key'=>$this->settings_page, |
| 274 |
'label'=>__('Delivery', 'wppizza-admin'), |
| 275 |
'description'=>array() |
| 276 |
)); |
| 277 |
$field = 'common_value_order_pickup'; |
| 278 |
$settings['fields'][$section_key][$field] = array( '', array( |
| 279 |
'value_key'=>$field, |
| 280 |
'option_key'=>$this->settings_page, |
| 281 |
'label'=>__('Pickup', 'wppizza-admin'), |
| 282 |
'description'=>array() |
| 283 |
)); |
| 284 |
$field = 'common_value_order_cash'; |
| 285 |
$settings['fields'][$section_key][$field] = array( '', array( |
| 286 |
'value_key'=>$field, |
| 287 |
'option_key'=>$this->settings_page, |
| 288 |
'label'=>__('Cash', 'wppizza-admin'), |
| 289 |
'description'=>array() |
| 290 |
)); |
| 291 |
$field = 'common_value_order_credit_card'; |
| 292 |
$settings['fields'][$section_key][$field] = array( '', array( |
| 293 |
'value_key'=>$field, |
| 294 |
'option_key'=>$this->settings_page, |
| 295 |
'label'=>__('Credit Card', 'wppizza-admin'), |
| 296 |
'description'=>array() |
| 297 |
)); |
| 298 |
} |
| 299 |
|
| 300 |
return $settings; |
| 301 |
} |
| 302 |
/******************************** |
| 303 |
* [User Purchase History] |
| 304 |
********************************/ |
| 305 |
function admin_localization_user_purchase_history($settings, $sections, $fields, $inputs, $help){ |
| 306 |
$section_key = 'user_purchase_history'; |
| 307 |
|
| 308 |
/*sections*/ |
| 309 |
if($sections){ |
| 310 |
$settings['sections'][$section_key] = __('User Purchase History', 'wppizza-admin'); |
| 311 |
} |
| 312 |
/*fields*/ |
| 313 |
if($fields){ |
| 314 |
$field = 'history_no_previous_orders'; |
| 315 |
$settings['fields'][$section_key][$field] = array( '', array( |
| 316 |
'value_key'=>$field, |
| 317 |
'option_key'=>$this->settings_page, |
| 318 |
'label'=>__('Text to display when the user has not had any previous orders', 'wppizza-admin') |
| 319 |
)); |
| 320 |
$field = 'history_legend_order_details'; |
| 321 |
$settings['fields'][$section_key][$field] = array( '', array( |
| 322 |
'value_key'=>$field, |
| 323 |
'option_key'=>$this->settings_page, |
| 324 |
'label'=>__('Legend Order Details', 'wppizza-admin') |
| 325 |
)); |
| 326 |
$field = 'history_legend_transaction_details'; |
| 327 |
$settings['fields'][$section_key][$field] = array( '', array( |
| 328 |
'value_key'=>$field, |
| 329 |
'option_key'=>$this->settings_page, |
| 330 |
'label'=>__('Legend Transaction Details', 'wppizza-admin') |
| 331 |
)); |
| 332 |
$field = 'history_order_delivered_label'; |
| 333 |
$settings['fields'][$section_key][$field] = array( '', array( |
| 334 |
'value_key'=>$field, |
| 335 |
'option_key'=>$this->settings_page, |
| 336 |
'label'=>__('Label when order was delivered / fulfilled', 'wppizza-admin') |
| 337 |
)); |
| 338 |
} |
| 339 |
return $settings; |
| 340 |
} |
| 341 |
function admin_localization_discounts($settings, $sections, $fields, $inputs, $help){ |
| 342 |
$section_key = 'discounts'; |
| 343 |
|
| 344 |
/*sections*/ |
| 345 |
if($sections){ |
| 346 |
$settings['sections'][$section_key] = __('Discounts', 'wppizza-admin'); |
| 347 |
} |
| 348 |
/*fields*/ |
| 349 |
if($fields){ |
| 350 |
#'spend' and 'save' removed in 3.16 in favour of full 'spend_save' sentance |
| 351 |
#$field = 'spend'; |
| 352 |
#$settings['fields'][$section_key][$field] = array( '', array( |
| 353 |
# 'value_key'=>$field, |
| 354 |
# 'option_key'=>$this->settings_page, |
| 355 |
# 'label'=>__('Label Discount (Spend): i.e "spend" 50.00 save 10.00', 'wppizza-admin') |
| 356 |
#)); |
| 357 |
#$field = 'save'; |
| 358 |
#$settings['fields'][$section_key][$field] = array( '', array( |
| 359 |
# 'value_key'=>$field, |
| 360 |
# 'option_key'=>$this->settings_page, |
| 361 |
# 'label'=>__('Label Discount (Save): i.e spend 50.00 "save" 10.00', 'wppizza-admin') |
| 362 |
#)); |
| 363 |
$field = 'spend_save'; |
| 364 |
$settings['fields'][$section_key][$field] = array( '', array( |
| 365 |
'value_key'=>$field, |
| 366 |
'option_key'=>$this->settings_page, |
| 367 |
/* Translators: 1: %s should not be translated here but used literally */ |
| 368 |
'label'=>__('Label Discount (Spend x and save y): i.e spend 50.00 save 10.00. (%s will be replaced by the applicable values.)', 'wppizza-admin') |
| 369 |
)); |
| 370 |
} |
| 371 |
return $settings; |
| 372 |
} |
| 373 |
|
| 374 |
function admin_localization_menu_item($settings, $sections, $fields, $inputs, $help){ |
| 375 |
$section_key = 'menu_item'; |
| 376 |
|
| 377 |
/*sections*/ |
| 378 |
if($sections){ |
| 379 |
$settings['sections'][$section_key] = __('Menu Item', 'wppizza-admin'); |
| 380 |
} |
| 381 |
/*fields*/ |
| 382 |
if($fields){ |
| 383 |
$field = 'contains_additives'; |
| 384 |
$settings['fields'][$section_key][$field] = array( '', array( |
| 385 |
'value_key'=>$field, 'localization', __('Menu Item: label when hovering over additives (if set)', 'wppizza-admin') |
| 386 |
)); |
| 387 |
$field = 'add_to_cart'; |
| 388 |
$settings['fields'][$section_key][$field] = array( '', array( |
| 389 |
'value_key'=>$field, 'localization', __('Menu Item: text to display when hovering over prices', 'wppizza-admin') |
| 390 |
)); |
| 391 |
$field = 'contains_additives'; |
| 392 |
$settings['fields'][$section_key][$field] = array( '', array( |
| 393 |
'value_key'=>$field, |
| 394 |
'option_key'=>$this->settings_page, |
| 395 |
'label'=>__('Menu Item: label when hovering over additives (if set)', 'wppizza-admin') |
| 396 |
)); |
| 397 |
$field = 'add_to_cart'; |
| 398 |
$settings['fields'][$section_key][$field] = array( '', array( |
| 399 |
'value_key'=>$field, |
| 400 |
'option_key'=>$this->settings_page, |
| 401 |
'label'=>__('Menu Item: text to display when hovering over prices', 'wppizza-admin') |
| 402 |
)); |
| 403 |
$field = 'alert_closed'; |
| 404 |
$settings['fields'][$section_key][$field] = array( '', array( |
| 405 |
'value_key'=>$field, |
| 406 |
'option_key'=>$this->settings_page, |
| 407 |
'label'=>__('Menu Item: alert when trying to add to cart but shop is closed', 'wppizza-admin'), |
| 408 |
'description'=>array(__('(Only displayed when shoppingcart is displayed on page)', 'wppizza-admin')) |
| 409 |
)); |
| 410 |
$field = 'alert_choose_size'; |
| 411 |
$settings['fields'][$section_key][$field] = array( '', array( |
| 412 |
'value_key'=>$field, |
| 413 |
'option_key'=>$this->settings_page, |
| 414 |
'label'=>__('Menu Item: alert when adding to cart by clicking on menu name but more than one size is available.', 'wppizza-admin'), |
| 415 |
'description'=>array(__('(Only relevant if "Add item to cart on click of *item title* " is enabled)', 'wppizza-admin')) |
| 416 |
)); |
| 417 |
$field = 'jquery_fb_add_to_cart_info'; |
| 418 |
$settings['fields'][$section_key][$field] = array( '', array( |
| 419 |
'value_key'=>$field, |
| 420 |
'option_key'=>$this->settings_page, |
| 421 |
'label'=>__('Menu Item: text that briefly replaces selected item price when adding item to cart [html allowed].', 'wppizza-admin'), |
| 422 |
'description'=>array(__('(Only relevant if "Briefly replace item price with customised text" in WPPizza->Layout is enabled. CSS Class: "wppizza-item-added-feedback")', 'wppizza-admin')) |
| 423 |
)); |
| 424 |
$field = 'no_results_found'; |
| 425 |
$settings['fields'][$section_key][$field] = array( '', array( |
| 426 |
'value_key'=>$field, |
| 427 |
'option_key'=>$this->settings_page, |
| 428 |
'label'=>__('Label if no menu items available on selected page', 'wppizza-admin') |
| 429 |
)); |
| 430 |
$field = 'uncategorised'; |
| 431 |
$settings['fields'][$section_key][$field] = array( '', array( |
| 432 |
'value_key'=>$field, |
| 433 |
'option_key'=>$this->settings_page, |
| 434 |
'label'=>__('Category label (if displaying categories for items in cart etc) for uncategorised menu items', 'wppizza-admin') |
| 435 |
)); |
| 436 |
} |
| 437 |
return $settings; |
| 438 |
} |
| 439 |
function admin_localization_pagination($settings, $sections, $fields, $inputs, $help){ |
| 440 |
$section_key = 'pagination'; |
| 441 |
|
| 442 |
/*sections*/ |
| 443 |
if($sections){ |
| 444 |
$settings['sections'][$section_key] = __('Pagination', 'wppizza-admin'); |
| 445 |
} |
| 446 |
/*fields*/ |
| 447 |
if($fields){ |
| 448 |
$field = 'previous'; |
| 449 |
$settings['fields'][$section_key][$field] = array( '', array( |
| 450 |
'value_key'=>$field, |
| 451 |
'option_key'=>$this->settings_page, |
| 452 |
'label'=>__('previous page', 'wppizza-admin') |
| 453 |
)); |
| 454 |
$field = 'next'; |
| 455 |
$settings['fields'][$section_key][$field] = array( '', array( |
| 456 |
'value_key'=>$field, |
| 457 |
'option_key'=>$this->settings_page, |
| 458 |
'label'=>__('next page', 'wppizza-admin') |
| 459 |
)); |
| 460 |
$field = 'pagination_info'; |
| 461 |
$settings['fields'][$section_key][$field] = array( '', array( |
| 462 |
'value_key'=>$field, |
| 463 |
'option_key'=>$this->settings_page, |
| 464 |
/* Translators: 1: %s should not be translated here but used literally */ |
| 465 |
'label'=>__('pagination info (i.e 5-10 of 35 or similar, %s being replaced as required)', 'wppizza-admin') |
| 466 |
)); |
| 467 |
} |
| 468 |
return $settings; |
| 469 |
} |
| 470 |
function admin_localization_openinghours($settings, $sections, $fields, $inputs, $help){ |
| 471 |
$section_key = 'openinghours'; |
| 472 |
|
| 473 |
/*sections*/ |
| 474 |
if($sections){ |
| 475 |
$settings['sections'][$section_key] = __('Openinghours', 'wppizza-admin'); |
| 476 |
} |
| 477 |
/*fields*/ |
| 478 |
if($fields){ |
| 479 |
$field = 'openinghours_closed'; |
| 480 |
$settings['fields'][$section_key][$field] = array( '', array( |
| 481 |
'value_key'=>$field, |
| 482 |
'option_key'=>$this->settings_page, |
| 483 |
'label'=>__('text to display when shop is closed that day ', 'wppizza-admin') |
| 484 |
)); |
| 485 |
$field = 'openinghours_24hrs'; |
| 486 |
$settings['fields'][$section_key][$field] = array( '', array( |
| 487 |
'value_key'=>$field, |
| 488 |
'option_key'=>$this->settings_page, |
| 489 |
'label'=>__('text to display when shop is open the whole day ', 'wppizza-admin') |
| 490 |
)); |
| 491 |
|
| 492 |
} |
| 493 |
return $settings; |
| 494 |
} |
| 495 |
// function admin_localization_email($settings, $sections, $fields, $inputs, $help){ |
| 496 |
// $section_key = 'email'; |
| 497 |
// |
| 498 |
// /*sections*/ |
| 499 |
// if($sections){ |
| 500 |
// $settings['sections'][$section_key] = __('Order Email', 'wppizza-admin'); |
| 501 |
// } |
| 502 |
// /*fields*/ |
| 503 |
// if($fields){ |
| 504 |
// $field = 'order_email_footer'; |
| 505 |
// $settings['fields'][$section_key][$field] = array( '', array( |
| 506 |
// 'value_key'=>$field, |
| 507 |
// 'option_key'=>$this->settings_page, |
| 508 |
// 'label'=>__('Text you would like to display at the end of emails after everything else. [html allowed]', 'wppizza-admin') |
| 509 |
// )); |
| 510 |
// } |
| 511 |
// return $settings; |
| 512 |
// } |
| 513 |
function admin_localization_orderpage($settings, $sections, $fields, $inputs, $help){ |
| 514 |
$section_key = 'orderpage'; |
| 515 |
|
| 516 |
/*sections*/ |
| 517 |
if($sections){ |
| 518 |
$settings['sections'][$section_key] = __('Order Page', 'wppizza-admin'). ' / ' . __('"Thank You" Page', 'wppizza-admin'); |
| 519 |
} |
| 520 |
/*fields*/ |
| 521 |
if($fields){ |
| 522 |
$field = 'your_order'; |
| 523 |
$settings['fields'][$section_key][$field] = array( '', array( |
| 524 |
'value_key'=>$field, |
| 525 |
'option_key'=>$this->settings_page, |
| 526 |
'label'=>__('label above itemised order', 'wppizza-admin') |
| 527 |
)); |
| 528 |
$field = 'send_order'; |
| 529 |
$settings['fields'][$section_key][$field] = array( '', array( |
| 530 |
'value_key'=>$field, |
| 531 |
'option_key'=>$this->settings_page, |
| 532 |
'label'=>__('button label for sending order', 'wppizza-admin') |
| 533 |
)); |
| 534 |
$field = 'update_order'; |
| 535 |
$settings['fields'][$section_key][$field] = array( '', array( |
| 536 |
'value_key'=>$field, |
| 537 |
'option_key'=>$this->settings_page, |
| 538 |
'label'=>__('button label for updating order [if enabled]', 'wppizza-admin') |
| 539 |
)); |
| 540 |
$field = 'order_form_legend'; |
| 541 |
$settings['fields'][$section_key][$field] = array( '', array( |
| 542 |
'value_key'=>$field, |
| 543 |
'option_key'=>$this->settings_page, |
| 544 |
'label'=>__('label above personal info', 'wppizza-admin') |
| 545 |
)); |
| 546 |
|
| 547 |
$field = 'order_page_handling'; |
| 548 |
$settings['fields'][$section_key][$field] = array( '', array( |
| 549 |
'value_key'=>$field, |
| 550 |
'option_key'=>$this->settings_page, |
| 551 |
'label'=>__('[Handling Charges]: text on order page if a handling charge for payment processing has been made (if applicable)', 'wppizza-admin') |
| 552 |
)); |
| 553 |
$field = 'order_page_handling_oncheckout'; |
| 554 |
$settings['fields'][$section_key][$field] = array( '', array( |
| 555 |
'value_key'=>$field, |
| 556 |
'option_key'=>$this->settings_page, |
| 557 |
'label'=>__('[Handling Charges]: text on order page if any handling charge will be calculated on checkout by a/the gateway itself', 'wppizza-admin') |
| 558 |
)); |
| 559 |
$field = 'required_field'; |
| 560 |
$settings['fields'][$section_key][$field] = array( '', array( |
| 561 |
'value_key'=>$field, |
| 562 |
'option_key'=>$this->settings_page, |
| 563 |
'label'=>__('message when required field is missing', 'wppizza-admin') |
| 564 |
)); |
| 565 |
$field = 'required_field_email'; |
| 566 |
$settings['fields'][$section_key][$field] = array( '', array( |
| 567 |
'value_key'=>$field, |
| 568 |
'option_key'=>$this->settings_page, |
| 569 |
'label'=>__('message when email address is invalid', 'wppizza-admin') |
| 570 |
)); |
| 571 |
$field = 'required_field_decimal'; |
| 572 |
$settings['fields'][$section_key][$field] = array( '', array( |
| 573 |
'value_key'=>$field, |
| 574 |
'option_key'=>$this->settings_page, |
| 575 |
'label'=>__('message when field should be a decimal number', 'wppizza-admin') |
| 576 |
)); |
| 577 |
$field = 'thank_you'; |
| 578 |
$settings['fields'][$section_key][$field] = array( '', array( |
| 579 |
'value_key'=>$field, |
| 580 |
'option_key'=>$this->settings_page, |
| 581 |
'label'=>__('label of thank you page after order has been sent', 'wppizza-admin') |
| 582 |
)); |
| 583 |
$field = 'thank_you_p'; |
| 584 |
$settings['fields'][$section_key][$field] = array( '', array( |
| 585 |
'value_key'=>$field, |
| 586 |
'option_key'=>$this->settings_page, |
| 587 |
'label'=>__('text of thank you page after order has been successfully sent', 'wppizza-admin'), |
| 588 |
'textarea' => true |
| 589 |
)); |
| 590 |
$field = 'personal_information'; |
| 591 |
$settings['fields'][$section_key][$field] = array( '', array( |
| 592 |
'value_key'=>$field, |
| 593 |
'option_key'=>$this->settings_page, |
| 594 |
'label'=>__('label "personal information" on thank you page after an order has been sent', 'wppizza-admin') |
| 595 |
)); |
| 596 |
$field = 'order_details'; |
| 597 |
$settings['fields'][$section_key][$field] = array( '', array( |
| 598 |
'value_key'=>$field, |
| 599 |
'option_key'=>$this->settings_page, |
| 600 |
'label'=>__('label "order details" on thank you page after an order has been sent', 'wppizza-admin') |
| 601 |
)); |
| 602 |
$field = 'thank_you_error'; |
| 603 |
$settings['fields'][$section_key][$field] = array( '', array( |
| 604 |
'value_key'=>$field, |
| 605 |
'option_key'=>$this->settings_page, |
| 606 |
'label'=>__('text on "thank you" page if there was an *error* completing the order ', 'wppizza-admin') |
| 607 |
)); |
| 608 |
$field = 'thank_you_error_contact_us'; |
| 609 |
$settings['fields'][$section_key][$field] = array( '', array( |
| 610 |
'value_key'=>$field, |
| 611 |
'option_key'=>$this->settings_page, |
| 612 |
'label'=>__('text on "thank you" page if there were problems receiving an order at the shops email address (you might want to add the shops phonenumber and/or email address here)', 'wppizza-admin') |
| 613 |
)); |
| 614 |
$field = 'order_not_found'; |
| 615 |
$settings['fields'][$section_key][$field] = array( '', array( |
| 616 |
'value_key'=>$field, |
| 617 |
'option_key'=>$this->settings_page, |
| 618 |
'label'=>__('generic text when order can not be found.', 'wppizza-admin') |
| 619 |
)); |
| 620 |
$field = 'label_return_to_shop'; |
| 621 |
$settings['fields'][$section_key][$field] = array( '', array( |
| 622 |
'value_key'=>$field, |
| 623 |
'option_key'=>$this->settings_page, |
| 624 |
'label'=>__('generic "return to shop" label - used in links for cancelled orders for example.', 'wppizza-admin') |
| 625 |
)); |
| 626 |
|
| 627 |
$field = 'order_ini_additional_info'; |
| 628 |
$settings['fields'][$section_key][$field] = array( '', array( |
| 629 |
'value_key'=>$field, |
| 630 |
'option_key'=>$this->settings_page, |
| 631 |
'label'=>__('text optional - additional info on order page [above all other details. only displays before submitting]', 'wppizza-admin'), |
| 632 |
'textarea' => true |
| 633 |
)); |
| 634 |
$field = 'update_profile'; |
| 635 |
$settings['fields'][$section_key][$field] = array( '', array( |
| 636 |
'value_key'=>$field, |
| 637 |
'option_key'=>$this->settings_page, |
| 638 |
'label'=>__('label next to checkbox text to allow user to update profile', 'wppizza-admin') |
| 639 |
)); |
| 640 |
$field = 'tips'; |
| 641 |
$settings['fields'][$section_key][$field] = array( '', array( |
| 642 |
'value_key'=>$field, |
| 643 |
'option_key'=>$this->settings_page, |
| 644 |
'label'=>__('Tips / Gratuities', 'wppizza-admin') |
| 645 |
)); |
| 646 |
$field = 'loginout_have_account'; |
| 647 |
$settings['fields'][$section_key][$field] = array( '', array( |
| 648 |
'value_key'=>$field, |
| 649 |
'option_key'=>$this->settings_page, |
| 650 |
'label'=>__('[login/logout]: text before login link', 'wppizza-admin') |
| 651 |
)); |
| 652 |
$field = 'register_option_label'; |
| 653 |
$settings['fields'][$section_key][$field] = array( '', array( |
| 654 |
'value_key'=>$field, |
| 655 |
'option_key'=>$this->settings_page, |
| 656 |
'label'=>__('[register]: text label register or continue as guest', 'wppizza-admin') |
| 657 |
)); |
| 658 |
$field = 'register_option_guest'; |
| 659 |
$settings['fields'][$section_key][$field] = array( '', array( |
| 660 |
'value_key'=>$field, |
| 661 |
'option_key'=>$this->settings_page, |
| 662 |
'label'=>__('[register]: register option -> as guest', 'wppizza-admin') |
| 663 |
)); |
| 664 |
$field = 'register_option_create_account'; |
| 665 |
$settings['fields'][$section_key][$field] = array( '', array( |
| 666 |
'value_key'=>$field, |
| 667 |
'option_key'=>$this->settings_page, |
| 668 |
'label'=>__('[register]: register option -> create account', 'wppizza-admin') |
| 669 |
)); |
| 670 |
$field = 'register_option_create_account_info'; |
| 671 |
$settings['fields'][$section_key][$field] = array( '', array( |
| 672 |
'value_key'=>$field, |
| 673 |
'option_key'=>$this->settings_page, |
| 674 |
'label'=>__('[register]: additional info when create account option is chosen [html allowed]', 'wppizza-admin') |
| 675 |
)); |
| 676 |
$field = 'register_option_create_account_error'; |
| 677 |
$settings['fields'][$section_key][$field] = array( '', array( |
| 678 |
'value_key'=>$field, |
| 679 |
'option_key'=>$this->settings_page, |
| 680 |
'label'=>__('[register]: error if email was already registered [html allowed]', 'wppizza-admin') |
| 681 |
)); |
| 682 |
|
| 683 |
} |
| 684 |
return $settings; |
| 685 |
} |
| 686 |
function admin_localization_labels_itemised($settings, $sections, $fields, $inputs, $help){ |
| 687 |
$section_key = 'labels_itemised'; |
| 688 |
|
| 689 |
/*sections*/ |
| 690 |
if($sections){ |
| 691 |
$settings['sections'][$section_key] = __('Labels - Itemised Order', 'wppizza-admin'); |
| 692 |
} |
| 693 |
/*fields*/ |
| 694 |
if($fields){ |
| 695 |
$field = 'itemised_label_quantity'; |
| 696 |
$settings['fields'][$section_key][$field] = array( '', array( |
| 697 |
'value_key'=>$field, |
| 698 |
'option_key'=>$this->settings_page, |
| 699 |
'label'=>__('Itemised Order Label - Quantity', 'wppizza-admin') |
| 700 |
)); |
| 701 |
$field = 'itemised_label_article'; |
| 702 |
$settings['fields'][$section_key][$field] = array( '', array( |
| 703 |
'value_key'=>$field, |
| 704 |
'option_key'=>$this->settings_page, |
| 705 |
'label'=>__('Itemised Order Label - Article', 'wppizza-admin') |
| 706 |
)); |
| 707 |
$field = 'itemised_label_price'; |
| 708 |
$settings['fields'][$section_key][$field] = array( '', array( |
| 709 |
'value_key'=>$field, |
| 710 |
'option_key'=>$this->settings_page, |
| 711 |
'label'=>__('Itemised Order Label - Single item price', 'wppizza-admin') |
| 712 |
)); |
| 713 |
$field = 'itemised_label_taxrate'; |
| 714 |
$settings['fields'][$section_key][$field] = array( '', array( |
| 715 |
'value_key'=>$field, |
| 716 |
'option_key'=>$this->settings_page, |
| 717 |
'label'=>__('Itemised Order Label - Applicable taxrate for item (only shown if items have different rates)', 'wppizza-admin') |
| 718 |
)); |
| 719 |
$field = 'itemised_label_total'; |
| 720 |
$settings['fields'][$section_key][$field] = array( '', array( |
| 721 |
'value_key'=>$field, |
| 722 |
'option_key'=>$this->settings_page, |
| 723 |
'label'=>__('Itemised Order Label - Total sum for item', 'wppizza-admin') |
| 724 |
)); |
| 725 |
} |
| 726 |
return $settings; |
| 727 |
} |
| 728 |
function admin_localization_price_labels_subtotals($settings, $sections, $fields, $inputs, $help){ |
| 729 |
$section_key = 'price_labels_subtotals'; |
| 730 |
|
| 731 |
/*sections*/ |
| 732 |
if($sections){ |
| 733 |
$settings['sections'][$section_key] = __('Labels - (Sub)Totals', 'wppizza-admin'); |
| 734 |
} |
| 735 |
/*fields*/ |
| 736 |
if($fields){ |
| 737 |
$field = 'free_delivery'; |
| 738 |
$settings['fields'][$section_key][$field] = array( '', array( |
| 739 |
'value_key'=>$field, |
| 740 |
'option_key'=>$this->settings_page, |
| 741 |
'label'=>__('(Sub)Totals: text to display when free delivery applies', 'wppizza-admin') |
| 742 |
)); |
| 743 |
$field = 'delivery_charges'; |
| 744 |
$settings['fields'][$section_key][$field] = array( '', array( |
| 745 |
'value_key'=>$field, |
| 746 |
'option_key'=>$this->settings_page, |
| 747 |
'label'=>__('(Sub)Totals: text delivery charges - when set to "Fixed" or "Free delivery over" (if applicable)', 'wppizza-admin') |
| 748 |
)); |
| 749 |
$field = 'delivery_charges_per_item'; |
| 750 |
$settings['fields'][$section_key][$field] = array( '', array( |
| 751 |
'value_key'=>$field, |
| 752 |
'option_key'=>$this->settings_page, |
| 753 |
'label'=>__('(Sub)Totals: text delivery when set to "Delivery Charges per item" (if applicable)', 'wppizza-admin') |
| 754 |
)); |
| 755 |
$field = 'discount'; |
| 756 |
$settings['fields'][$section_key][$field] = array( '', array( |
| 757 |
'value_key'=>$field, |
| 758 |
'option_key'=>$this->settings_page, |
| 759 |
'label'=>__('(Sub)Totals: text before sum of discounts applied(if any)', 'wppizza-admin') |
| 760 |
)); |
| 761 |
$field = 'item_tax_total'; |
| 762 |
$settings['fields'][$section_key][$field] = array( '', array( |
| 763 |
'value_key'=>$field, |
| 764 |
'option_key'=>$this->settings_page, |
| 765 |
/* Translators: 1: %s should not be translated here but used literally */ |
| 766 |
'label'=>__('(Sub)Totals: text before sum of tax applied to all items(if > 0). %s will be replaced by taxrate(s) applied', 'wppizza-admin') |
| 767 |
)); |
| 768 |
$field = 'taxes_included'; |
| 769 |
$settings['fields'][$section_key][$field] = array( '', array( |
| 770 |
'value_key'=>$field, |
| 771 |
'option_key'=>$this->settings_page, |
| 772 |
'label'=>__('(Sub)Totals: text before sum of tax applied if prices have been entered *inclusive* of tax (if > 0)', 'wppizza-admin'), |
| 773 |
/* Translators: 1: %s should not be translated here but used literally */ |
| 774 |
'description'=>array(__('%s will be replaced by taxrate(s) applied', 'wppizza-admin')) |
| 775 |
)); |
| 776 |
$field = 'shipping_tax'; |
| 777 |
$settings['fields'][$section_key][$field] = array( '', array( |
| 778 |
'value_key'=>$field, |
| 779 |
'option_key'=>$this->settings_page, |
| 780 |
/* Translators: 1: %s should not be translated here but used literally */ |
| 781 |
'label'=>__('(Sub)Totals: delivery charges tax (if any). %s will be replaced by taxrate(s) applied', 'wppizza-admin') |
| 782 |
)); |
| 783 |
$field = 'tax_total'; |
| 784 |
$settings['fields'][$section_key][$field] = array( '', array( |
| 785 |
'value_key'=>$field, |
| 786 |
'option_key'=>$this->settings_page, |
| 787 |
'label'=>__('(Sub)Totals: Tax total', 'wppizza-admin') |
| 788 |
)); |
| 789 |
$field = 'tax_total_included'; |
| 790 |
$settings['fields'][$section_key][$field] = array( '', array( |
| 791 |
'value_key'=>$field, |
| 792 |
'option_key'=>$this->settings_page, |
| 793 |
'label'=>__('(Sub)Totals: Taxes included', 'wppizza-admin') |
| 794 |
)); |
| 795 |
$field = 'handling_charges'; |
| 796 |
$settings['fields'][$section_key][$field] = array( '', array( |
| 797 |
'value_key'=>$field, |
| 798 |
'option_key'=>$this->settings_page, |
| 799 |
'label'=>__('(Sub)Totals: handling charges (if any)', 'wppizza-admin') |
| 800 |
)); |
| 801 |
$field = 'surcharge_percentage'; |
| 802 |
$settings['fields'][$section_key][$field] = array( '', array( |
| 803 |
'value_key'=>$field, |
| 804 |
'option_key'=>$this->settings_page, |
| 805 |
/* Translators: 1: %s should not be translated here but used literally */ |
| 806 |
'label'=>__('(Sub)Totals: surcharges percentage (if any). %s will be replaced by rate applied', 'wppizza-admin') |
| 807 |
)); |
| 808 |
$field = 'surcharge_fixed'; |
| 809 |
$settings['fields'][$section_key][$field] = array( '', array( |
| 810 |
'value_key'=>$field, |
| 811 |
'option_key'=>$this->settings_page, |
| 812 |
'label'=>__('(Sub)Totals: surcharges fixed (if any)', 'wppizza-admin') |
| 813 |
)); |
| 814 |
$field = 'order_total'; |
| 815 |
$settings['fields'][$section_key][$field] = array( '', array( |
| 816 |
'value_key'=>$field, |
| 817 |
'option_key'=>$this->settings_page, |
| 818 |
'label'=>__('(Sub)Totals: text before total sum of ORDER', 'wppizza-admin') |
| 819 |
)); |
| 820 |
$field = 'order_items'; |
| 821 |
$settings['fields'][$section_key][$field] = array( '', array( |
| 822 |
'value_key'=>$field, |
| 823 |
'option_key'=>$this->settings_page, |
| 824 |
'label'=>__('(Sub)Totals: text before total sum of ITEMS in cart', 'wppizza-admin') |
| 825 |
)); |
| 826 |
} |
| 827 |
return $settings; |
| 828 |
} |
| 829 |
function admin_localization_print_order_admin($settings, $sections, $fields, $inputs, $help){ |
| 830 |
$section_key = 'print_order_admin'; |
| 831 |
|
| 832 |
/*sections*/ |
| 833 |
if($sections){ |
| 834 |
$settings['sections'][$section_key] = __('Print/Email Order Templates ', 'wppizza-admin'); |
| 835 |
} |
| 836 |
/*fields*/ |
| 837 |
if($fields){ |
| 838 |
$field = 'header_order_print_header'; |
| 839 |
$settings['fields'][$section_key][$field] = array( '', array( |
| 840 |
'value_key'=>$field, |
| 841 |
'option_key'=>$this->settings_page, |
| 842 |
'label'=>__('[Header]: optional - for example your shops name', 'wppizza-admin') |
| 843 |
)); |
| 844 |
$field = 'header_order_print_shop_address'; |
| 845 |
$settings['fields'][$section_key][$field] = array( '', array( |
| 846 |
'value_key'=>$field, |
| 847 |
'option_key'=>$this->settings_page, |
| 848 |
'label'=>__('[Address]: replace with your shop\'s address [html allowed]', 'wppizza-admin') |
| 849 |
)); |
| 850 |
$field = 'header_order_print_customer_label'; |
| 851 |
$settings['fields'][$section_key][$field] = array( '', array( |
| 852 |
'value_key'=>$field, |
| 853 |
'option_key'=>$this->settings_page, |
| 854 |
'label'=>__('[Label]: customer details', 'wppizza-admin') |
| 855 |
)); |
| 856 |
$field = 'header_order_print_overview_label'; |
| 857 |
$settings['fields'][$section_key][$field] = array( '', array( |
| 858 |
'value_key'=>$field, |
| 859 |
'option_key'=>$this->settings_page, |
| 860 |
'label'=>__('[Label]: order overview', 'wppizza-admin') |
| 861 |
)); |
| 862 |
$field = 'header_order_print_itemised_article'; |
| 863 |
$settings['fields'][$section_key][$field] = array( '', array( |
| 864 |
'value_key'=>$field, |
| 865 |
'option_key'=>$this->settings_page, |
| 866 |
'label'=>__('[itemised header]: article', 'wppizza-admin') |
| 867 |
)); |
| 868 |
$field = 'header_order_print_itemised_price'; |
| 869 |
$settings['fields'][$section_key][$field] = array( '', array( |
| 870 |
'value_key'=>$field, |
| 871 |
'option_key'=>$this->settings_page, |
| 872 |
'label'=>__('[itemised header]: price', 'wppizza-admin') |
| 873 |
)); |
| 874 |
$field = 'header_order_print_itemised_quantity'; |
| 875 |
$settings['fields'][$section_key][$field] = array( '', array( |
| 876 |
'value_key'=>$field, |
| 877 |
'option_key'=>$this->settings_page, |
| 878 |
'label'=>__('[itemised header]: quantity', 'wppizza-admin') |
| 879 |
)); |
| 880 |
} |
| 881 |
return $settings; |
| 882 |
} |
| 883 |
function admin_localization_cart($settings, $sections, $fields, $inputs, $help){ |
| 884 |
$section_key = 'cart'; |
| 885 |
|
| 886 |
/*sections*/ |
| 887 |
if($sections){ |
| 888 |
$settings['sections'][$section_key] = __('Shoppingcart', 'wppizza-admin'); |
| 889 |
} |
| 890 |
/*fields*/ |
| 891 |
if($fields){ |
| 892 |
$field = 'closed'; |
| 893 |
$settings['fields'][$section_key][$field] = array( '', array( |
| 894 |
'value_key'=>$field, |
| 895 |
'option_key'=>$this->settings_page, |
| 896 |
'label'=>__('text to display when shop closed ', 'wppizza-admin') |
| 897 |
)); |
| 898 |
$field = 'closed_for_holidays'; |
| 899 |
$settings['fields'][$section_key][$field] = array( '', array( |
| 900 |
'value_key'=>$field, |
| 901 |
'option_key'=>$this->settings_page, |
| 902 |
/* Translators: 1: %s should not be translated here but used literally */ |
| 903 |
'label'=>__('text to display when shop closed for holidays. %s being replaced by next opening day', 'wppizza-admin') |
| 904 |
)); |
| 905 |
$field = 'empty_cart'; |
| 906 |
$settings['fields'][$section_key][$field] = array( '', array( |
| 907 |
'value_key'=>$field, |
| 908 |
'option_key'=>$this->settings_page, |
| 909 |
'label'=>__('empty cart button text', 'wppizza-admin') |
| 910 |
)); |
| 911 |
$field = 'view_cart'; |
| 912 |
$settings['fields'][$section_key][$field] = array( '', array( |
| 913 |
'value_key'=>$field, |
| 914 |
'option_key'=>$this->settings_page, |
| 915 |
'label'=>__('view cart button text', 'wppizza-admin') |
| 916 |
)); |
| 917 |
$field = 'cart_is_empty'; |
| 918 |
$settings['fields'][$section_key][$field] = array( '', array( |
| 919 |
'value_key'=>$field, |
| 920 |
'option_key'=>$this->settings_page, |
| 921 |
'label'=>__('text to display when cart is empty', 'wppizza-admin') |
| 922 |
)); |
| 923 |
$field = 'remove_from_cart'; |
| 924 |
$settings['fields'][$section_key][$field] = array( '', array( |
| 925 |
'value_key'=>$field, |
| 926 |
'option_key'=>$this->settings_page, |
| 927 |
'label'=>__('text to display when hovering over remove from cart icon', 'wppizza-admin') |
| 928 |
)); |
| 929 |
$field = 'place_your_order'; |
| 930 |
$settings['fields'][$section_key][$field] = array( '', array( |
| 931 |
'value_key'=>$field, |
| 932 |
'option_key'=>$this->settings_page, |
| 933 |
'label'=>__('text of button in cart to proceed to order page', 'wppizza-admin') |
| 934 |
)); |
| 935 |
$field = 'cart_checkout'; |
| 936 |
$settings['fields'][$section_key][$field] = array( '', array( |
| 937 |
'value_key'=>$field, |
| 938 |
'option_key'=>$this->settings_page, |
| 939 |
'label'=>__('text of button in small carts (minicart etc) to proceed to order page', 'wppizza-admin') |
| 940 |
)); |
| 941 |
$field = 'cart_closed'; |
| 942 |
$settings['fields'][$section_key][$field] = array( '', array( |
| 943 |
'value_key'=>$field, |
| 944 |
'option_key'=>$this->settings_page, |
| 945 |
'label'=>__('text in small carts (minicart etc) if shop closed', 'wppizza-admin') |
| 946 |
)); |
| 947 |
} |
| 948 |
return $settings; |
| 949 |
} |
| 950 |
function admin_localization_template($settings, $sections, $fields, $inputs, $help){ |
| 951 |
$section_key = 'template'; |
| 952 |
|
| 953 |
/*sections*/ |
| 954 |
if($sections){ |
| 955 |
$settings['sections'][$section_key] = __('Templates Other', 'wppizza-admin'); |
| 956 |
} |
| 957 |
/*fields*/ |
| 958 |
if($fields){ |
| 959 |
$field = 'templates_label_site'; |
| 960 |
$settings['fields'][$section_key][$field] = array( '', array( |
| 961 |
'value_key'=>$field, |
| 962 |
'option_key'=>$this->settings_page, |
| 963 |
'label'=>__('Label : "Site Details"', 'wppizza-admin') |
| 964 |
)); |
| 965 |
$field = 'templates_label_ordervars'; |
| 966 |
$settings['fields'][$section_key][$field] = array( '', array( |
| 967 |
'value_key'=>$field, |
| 968 |
'option_key'=>$this->settings_page, |
| 969 |
'label'=>__('Label : "Overview"', 'wppizza-admin') |
| 970 |
)); |
| 971 |
$field = 'templates_label_customer'; |
| 972 |
$settings['fields'][$section_key][$field] = array( '', array( |
| 973 |
'value_key'=>$field, |
| 974 |
'option_key'=>$this->settings_page, |
| 975 |
'label'=>__('Label : "Customer Details"', 'wppizza-admin') |
| 976 |
)); |
| 977 |
$field = 'templates_label_order'; |
| 978 |
$settings['fields'][$section_key][$field] = array( '', array( |
| 979 |
'value_key'=>$field, |
| 980 |
'option_key'=>$this->settings_page, |
| 981 |
'label'=>__('Label : "Order Details"', 'wppizza-admin') |
| 982 |
)); |
| 983 |
$field = 'templates_label_order_left'; |
| 984 |
$settings['fields'][$section_key][$field] = array( '', array( |
| 985 |
'value_key'=>$field, |
| 986 |
'option_key'=>$this->settings_page, |
| 987 |
'label'=>__('Label : "Order" - [1] First Column (e.g Quantity)', 'wppizza-admin') |
| 988 |
)); |
| 989 |
$field = 'templates_label_order_center'; |
| 990 |
$settings['fields'][$section_key][$field] = array( '', array( |
| 991 |
'value_key'=>$field, |
| 992 |
'option_key'=>$this->settings_page, |
| 993 |
'label'=>__('Label : "Order" - [2] Second Column (e.g Article)', 'wppizza-admin') |
| 994 |
)); |
| 995 |
$field = 'templates_label_order_right'; |
| 996 |
$settings['fields'][$section_key][$field] = array( '', array( |
| 997 |
'value_key'=>$field, |
| 998 |
'option_key'=>$this->settings_page, |
| 999 |
'label'=>__('Label : "Order" - [3] Third Column (e.g Price)', 'wppizza-admin') |
| 1000 |
)); |
| 1001 |
$field = 'templates_label_summary'; |
| 1002 |
$settings['fields'][$section_key][$field] = array( '', array( |
| 1003 |
'value_key'=>$field, |
| 1004 |
'option_key'=>$this->settings_page, |
| 1005 |
'label'=>__('Label : "Summary"', 'wppizza-admin') |
| 1006 |
)); |
| 1007 |
$field = 'templates_user_is_guest'; |
| 1008 |
$settings['fields'][$section_key][$field] = array( '', array( |
| 1009 |
'value_key'=>$field, |
| 1010 |
'option_key'=>$this->settings_page, |
| 1011 |
'label'=>__('Overview -> User : "Guest"', 'wppizza-admin') |
| 1012 |
)); |
| 1013 |
$field = 'templates_user_is_registered'; |
| 1014 |
$settings['fields'][$section_key][$field] = array( '', array( |
| 1015 |
'value_key'=>$field, |
| 1016 |
'option_key'=>$this->settings_page, |
| 1017 |
'label'=>__('Overview -> User : "Registered"', 'wppizza-admin') |
| 1018 |
)); |
| 1019 |
$field = 'templates_footer_note'; |
| 1020 |
$settings['fields'][$section_key][$field] = array( '', array( |
| 1021 |
'value_key'=>$field, |
| 1022 |
'option_key'=>$this->settings_page, |
| 1023 |
'label'=>__('Footer (Email Templates): text after summary / totals [html allowed - use linebreaks for newlines in plaintext output]', 'wppizza-admin'), |
| 1024 |
'textarea' => true |
| 1025 |
)); |
| 1026 |
$field = 'templates_footer_note_print'; |
| 1027 |
$settings['fields'][$section_key][$field] = array( '', array( |
| 1028 |
'value_key'=>$field, |
| 1029 |
'option_key'=>$this->settings_page, |
| 1030 |
'label'=>__('Footer (Print Templates): text after summary / totals [html allowed - use linebreaks for newlines in plaintext output]', 'wppizza-admin'), |
| 1031 |
'textarea' => true |
| 1032 |
)); |
| 1033 |
} |
| 1034 |
return $settings; |
| 1035 |
} |
| 1036 |
function admin_localization_gateways($settings, $sections, $fields, $inputs, $help){ |
| 1037 |
$section_key = 'gateways'; |
| 1038 |
|
| 1039 |
/*sections*/ |
| 1040 |
if($sections){ |
| 1041 |
$settings['sections'][$section_key] = __('Gateways', 'wppizza-admin'); |
| 1042 |
} |
| 1043 |
/*fields*/ |
| 1044 |
if($fields){ |
| 1045 |
$field = 'gateway_select_label'; |
| 1046 |
$settings['fields'][$section_key][$field] = array( '', array( |
| 1047 |
'value_key'=>$field, |
| 1048 |
'option_key'=>$this->settings_page, |
| 1049 |
'label'=>"".__('Displayed above gateway choices if those are displayed as full width buttons. Displayed adjacent to select if gateways displayed dropdown. Edit css as required', 'wppizza-admin')." ".__('[only applicable if more than one gateway installed, activated and enabled]', 'wppizza-admin')."" |
| 1050 |
)); |
| 1051 |
|
| 1052 |
$field = 'order_cancelled'; |
| 1053 |
$settings['fields'][$section_key][$field] = array( '', array( |
| 1054 |
'value_key'=>$field, |
| 1055 |
'option_key'=>$this->settings_page, |
| 1056 |
'label'=>__('label on order page when an order has been cancelled', 'wppizza-admin') |
| 1057 |
)); |
| 1058 |
|
| 1059 |
$field = 'order_cancelled_p'; |
| 1060 |
$settings['fields'][$section_key][$field] = array( '', array( |
| 1061 |
'value_key'=>$field, |
| 1062 |
'option_key'=>$this->settings_page, |
| 1063 |
'label'=>__('text on order page when an order has been cancelled', 'wppizza-admin') |
| 1064 |
)); |
| 1065 |
|
| 1066 |
$field = 'order_processing'; |
| 1067 |
$settings['fields'][$section_key][$field] = array( '', array( |
| 1068 |
'value_key'=>$field, |
| 1069 |
'option_key'=>$this->settings_page, |
| 1070 |
'label'=>__('label on order page when payment is being processed', 'wppizza-admin') |
| 1071 |
)); |
| 1072 |
|
| 1073 |
$field = 'order_processing_p'; |
| 1074 |
$settings['fields'][$section_key][$field] = array( '', array( |
| 1075 |
'value_key'=>$field, |
| 1076 |
'option_key'=>$this->settings_page, |
| 1077 |
'label'=>__('text on order page when an order is being processed [html allowed]', 'wppizza-admin') |
| 1078 |
)); |
| 1079 |
|
| 1080 |
$field = 'order_payment_pending'; |
| 1081 |
$settings['fields'][$section_key][$field] = array( '', array( |
| 1082 |
'value_key'=>$field, |
| 1083 |
'option_key'=>$this->settings_page, |
| 1084 |
'label'=>__('label on order page when payment has not yet been confirmed / is still pending', 'wppizza-admin') |
| 1085 |
)); |
| 1086 |
|
| 1087 |
$field = 'order_payment_pending_p'; |
| 1088 |
$settings['fields'][$section_key][$field] = array( '', array( |
| 1089 |
'value_key'=>$field, |
| 1090 |
'option_key'=>$this->settings_page, |
| 1091 |
/* Translators: 1: %s should not be translated here but used literally */ |
| 1092 |
'label'=>__('text on order page when payment has not yet been confirmed / is still pending (%s will be replaced by the link to the current page) [html allowed]', 'wppizza-admin') |
| 1093 |
)); |
| 1094 |
|
| 1095 |
$field = 'order_unconfirmed'; |
| 1096 |
$settings['fields'][$section_key][$field] = array( '', array( |
| 1097 |
'value_key'=>$field, |
| 1098 |
'option_key'=>$this->settings_page, |
| 1099 |
'label'=>__('label on order page when payment has been accepted but is still awaiting confirmation (some gateways might take some time for final payment confirmation).', 'wppizza-admin') |
| 1100 |
)); |
| 1101 |
|
| 1102 |
$field = 'order_unconfirmed_p'; |
| 1103 |
$settings['fields'][$section_key][$field] = array( '', array( |
| 1104 |
'value_key'=>$field, |
| 1105 |
'option_key'=>$this->settings_page, |
| 1106 |
'label'=>__('text on order page when payment has been accepted but is still awaiting confirmation (some gateways might take some time for final payment confirmation). [html allowed]', 'wppizza-admin') |
| 1107 |
)); |
| 1108 |
|
| 1109 |
$field = 'order_confirmed'; |
| 1110 |
$settings['fields'][$section_key][$field] = array( '', array( |
| 1111 |
'value_key'=>$field, |
| 1112 |
'option_key'=>$this->settings_page, |
| 1113 |
'label'=>__('label on order page when payment has been confirmed (for gateways that might take some time for final payment confirmation).', 'wppizza-admin') |
| 1114 |
)); |
| 1115 |
|
| 1116 |
$field = 'order_confirmed_p'; |
| 1117 |
$settings['fields'][$section_key][$field] = array( '', array( |
| 1118 |
'value_key'=>$field, |
| 1119 |
'option_key'=>$this->settings_page, |
| 1120 |
'label'=>__('text on order page when payment has been confirmed (for gateways that might take some time for final payment confirmation). [html allowed]', 'wppizza-admin') |
| 1121 |
)); |
| 1122 |
|
| 1123 |
$field = 'gateway_your_order'; |
| 1124 |
$settings['fields'][$section_key][$field] = array( '', array( |
| 1125 |
'value_key'=>$field, |
| 1126 |
'option_key'=>$this->settings_page, |
| 1127 |
'label'=>__('some gateways allow a distinct text to be displayed on their payment pages and/or receipts (might get shortened by the gateway)', 'wppizza-admin') |
| 1128 |
)); |
| 1129 |
|
| 1130 |
$field = 'gateway_enter_payment_details'; |
| 1131 |
$settings['fields'][$section_key][$field] = array( '', array( |
| 1132 |
'value_key'=>$field, |
| 1133 |
'option_key'=>$this->settings_page, |
| 1134 |
'label'=>__('Fieldset label if your chosen payment gateway allows payment details to be entered inline (as opposed to redirect or modal/overlay windows)', 'wppizza-admin') |
| 1135 |
)); |
| 1136 |
|
| 1137 |
} |
| 1138 |
return $settings; |
| 1139 |
} |
| 1140 |
function admin_localization_widgets($settings, $sections, $fields, $inputs, $help){ |
| 1141 |
$section_key = 'widgets'; |
| 1142 |
|
| 1143 |
/*sections*/ |
| 1144 |
if($sections){ |
| 1145 |
$settings['sections'][$section_key] = __('Widgets', 'wppizza-admin'); |
| 1146 |
} |
| 1147 |
/*fields*/ |
| 1148 |
if($fields){ |
| 1149 |
$field = 'widget_navigation_dropdown_placeholder'; |
| 1150 |
$settings['fields'][$section_key][$field] = array( '', array( |
| 1151 |
'value_key'=>$field, |
| 1152 |
'option_key'=>$this->settings_page, |
| 1153 |
'label'=>__('select default text/placeholder to display for navigation widget when using dropdown [empty to omit placeholder]', 'wppizza-admin') |
| 1154 |
)); |
| 1155 |
} |
| 1156 |
return $settings; |
| 1157 |
} |
| 1158 |
function admin_localization_user_profile($settings, $sections, $fields, $inputs, $help){ |
| 1159 |
$section_key = 'user_profile'; |
| 1160 |
|
| 1161 |
/*sections*/ |
| 1162 |
if($sections){ |
| 1163 |
$settings['sections'][$section_key] = __('User Profile', 'wppizza-admin'); |
| 1164 |
} |
| 1165 |
/*fields*/ |
| 1166 |
if($fields){ |
| 1167 |
$field = 'user_profile_label_additional_info'; |
| 1168 |
$settings['fields'][$section_key][$field] = array( '', array( |
| 1169 |
'value_key'=>$field, |
| 1170 |
'option_key'=>$this->settings_page, |
| 1171 |
'label'=>__('Title above additional fields added/enabled', 'wppizza-admin') |
| 1172 |
)); |
| 1173 |
} |
| 1174 |
return $settings; |
| 1175 |
} |
| 1176 |
function admin_localization_miscellaneous($settings, $sections, $fields, $inputs, $help){ |
| 1177 |
$section_key = 'miscellaneous'; |
| 1178 |
|
| 1179 |
/*sections*/ |
| 1180 |
if($sections){ |
| 1181 |
$settings['sections'][$section_key] = __('Miscellaneous', 'wppizza-admin'); |
| 1182 |
} |
| 1183 |
/*fields*/ |
| 1184 |
if($fields){ |
| 1185 |
|
| 1186 |
$field = 'generic_placeholder_select'; |
| 1187 |
$settings['fields'][$section_key][$field] = array( '', array( |
| 1188 |
'value_key'=>$field, |
| 1189 |
'option_key'=>$this->settings_page, |
| 1190 |
'label'=>__('Generic placeholder / initial select for dropdowns', 'wppizza-admin') |
| 1191 |
)); |
| 1192 |
$field = 'generic_placeholder_checkbox_0'; |
| 1193 |
$settings['fields'][$section_key][$field] = array( '', array( |
| 1194 |
'value_key'=>$field, |
| 1195 |
'option_key'=>$this->settings_page, |
| 1196 |
'label'=>__('Generic placeholder when a checkbox was left un-checked', 'wppizza-admin') |
| 1197 |
)); |
| 1198 |
$field = 'generic_placeholder_checkbox_1'; |
| 1199 |
$settings['fields'][$section_key][$field] = array( '', array( |
| 1200 |
'value_key'=>$field, |
| 1201 |
'option_key'=>$this->settings_page, |
| 1202 |
'label'=>__('Generic placeholder when a checkbox was checked', 'wppizza-admin') |
| 1203 |
)); |
| 1204 |
$field = 'admin_notify_new_order_label'; |
| 1205 |
$settings['fields'][$section_key][$field] = array( '', array( |
| 1206 |
'value_key'=>$field, |
| 1207 |
'option_key'=>$this->settings_page, |
| 1208 |
/* Translators: 1: %%s should not be translated here but used literally, 2 : WPPizza Name as defined by constant. */ |
| 1209 |
'label'=>sprintf(__('Admin bar "New Order(s)" notifications [%%s will be replaced with %s]', 'wppizza-admin'), WPPIZZA_NAME) |
| 1210 |
)); |
| 1211 |
$field = 'failed_payment_try_again_link'; |
| 1212 |
$settings['fields'][$section_key][$field] = array( '', array( |
| 1213 |
'value_key'=>$field, |
| 1214 |
'option_key'=>$this->settings_page, |
| 1215 |
'label'=>__('Link Label back to order page if a payment has failed', 'wppizza-admin') |
| 1216 |
)); |
| 1217 |
$field = 'generic_back_to_site'; |
| 1218 |
$settings['fields'][$section_key][$field] = array( '', array( |
| 1219 |
'value_key'=>$field, |
| 1220 |
'option_key'=>$this->settings_page, |
| 1221 |
'label'=>__('Generic "Back to Merchant Site" Label', 'wppizza-admin') |
| 1222 |
)); |
| 1223 |
$field = 'generic_error_label'; |
| 1224 |
$settings['fields'][$section_key][$field] = array( '', array( |
| 1225 |
'value_key'=>$field, |
| 1226 |
'option_key'=>$this->settings_page, |
| 1227 |
'label'=>__('Generic "Error" Label', 'wppizza-admin') |
| 1228 |
)); |
| 1229 |
$field = 'generic_error_details'; |
| 1230 |
$settings['fields'][$section_key][$field] = array( '', array( |
| 1231 |
'value_key'=>$field, |
| 1232 |
'option_key'=>$this->settings_page, |
| 1233 |
'label'=>__('Generic "Error Details" Label', 'wppizza-admin') |
| 1234 |
)); |
| 1235 |
$field = 'localize_zero_price'; |
| 1236 |
$settings['fields'][$section_key][$field] = array( '', array( |
| 1237 |
'value_key'=>$field, |
| 1238 |
'option_key'=>$this->settings_page, |
| 1239 |
'label'=>__('Display "Free" - or whatever you set here - instead of price if price equals zero (and enabled in WPPizza -> Layout)', 'wppizza-admin') |
| 1240 |
)); |
| 1241 |
|
| 1242 |
$field = 'privacy_terms_accept'; |
| 1243 |
$settings['fields'][$section_key][$field] = array( '', array( |
| 1244 |
'value_key'=>$field, |
| 1245 |
'option_key'=>$this->settings_page, |
| 1246 |
/* Translators: 1 : WPPizza Name as defined by constant, 2: %%s should not be translated here but used literally */ |
| 1247 |
'label'=>sprintf(__('Label for "accept privacy" checkbox on order form (if enabled in %s->Settings->GDPR / Privacy). %%s will be replaced with a link to your published privacy page set in Wordpress->Settings->Privacy', 'wppizza-admin'), WPPIZZA_NAME) |
| 1248 |
)); |
| 1249 |
|
| 1250 |
$field = 'privacy_terms_accepted'; |
| 1251 |
$settings['fields'][$section_key][$field] = array( '', array( |
| 1252 |
'value_key'=>$field, |
| 1253 |
'option_key'=>$this->settings_page, |
| 1254 |
/* Translators: 1 : WPPizza Name as defined by constant. */ |
| 1255 |
'label'=>sprintf(__('Label if "accept privacy" checkbox was checked on confirmation page (if used and provided %s->Settings->GDPR / Privacy is enabled) ', 'wppizza-admin'), WPPIZZA_NAME) |
| 1256 |
)); |
| 1257 |
|
| 1258 |
|
| 1259 |
} |
| 1260 |
return $settings; |
| 1261 |
} |
| 1262 |
function admin_localization_admin_orderhistory_statuses($settings, $sections, $fields, $inputs, $help){ |
| 1263 |
$section_key = 'orderhistory_statuses'; |
| 1264 |
|
| 1265 |
/*sections*/ |
| 1266 |
if($sections){ |
| 1267 |
$settings['sections'][$section_key] = __('Admin Order History - Order Statuses <a href="javascript:void(0)" class="wppizza-show-admin-help">(see help)</a>', 'wppizza-admin'); |
| 1268 |
} |
| 1269 |
/*fields*/ |
| 1270 |
if($fields){ |
| 1271 |
|
| 1272 |
$field = 'order_history_status_new'; |
| 1273 |
$settings['fields'][$section_key][$field] = array( '', array( |
| 1274 |
'value_key'=>$field, |
| 1275 |
'option_key'=>$this->settings_page, |
| 1276 |
'label'=>__('Order Status : New', 'wppizza-admin') |
| 1277 |
)); |
| 1278 |
$field = 'order_history_status_acknowledged'; |
| 1279 |
$settings['fields'][$section_key][$field] = array( '', array( |
| 1280 |
'value_key'=>$field, |
| 1281 |
'option_key'=>$this->settings_page, |
| 1282 |
'label'=>__('Order Status : Acknowledged', 'wppizza-admin') |
| 1283 |
)); |
| 1284 |
$field = 'order_history_status_on_hold'; |
| 1285 |
$settings['fields'][$section_key][$field] = array( '', array( |
| 1286 |
'value_key'=>$field, |
| 1287 |
'option_key'=>$this->settings_page, |
| 1288 |
'label'=>__('Order Status : On Hold', 'wppizza-admin') |
| 1289 |
)); |
| 1290 |
$field = 'order_history_status_processed'; |
| 1291 |
$settings['fields'][$section_key][$field] = array( '', array( |
| 1292 |
'value_key'=>$field, |
| 1293 |
'option_key'=>$this->settings_page, |
| 1294 |
'label'=>__('Order Status : Processed', 'wppizza-admin') |
| 1295 |
)); |
| 1296 |
$field = 'order_history_status_delivered'; |
| 1297 |
$settings['fields'][$section_key][$field] = array( '', array( |
| 1298 |
'value_key'=>$field, |
| 1299 |
'option_key'=>$this->settings_page, |
| 1300 |
'label'=>__('Order Status : Delivered', 'wppizza-admin') |
| 1301 |
)); |
| 1302 |
$field = 'order_history_status_rejected'; |
| 1303 |
$settings['fields'][$section_key][$field] = array( '', array( |
| 1304 |
'value_key'=>$field, |
| 1305 |
'option_key'=>$this->settings_page, |
| 1306 |
'label'=>__('Order Status : Rejected', 'wppizza-admin') |
| 1307 |
)); |
| 1308 |
$field = 'order_history_status_refunded'; |
| 1309 |
$settings['fields'][$section_key][$field] = array( '', array( |
| 1310 |
'value_key'=>$field, |
| 1311 |
'option_key'=>$this->settings_page, |
| 1312 |
'label'=>__('Order Status : Refunded', 'wppizza-admin') |
| 1313 |
)); |
| 1314 |
|
| 1315 |
$field = 'order_history_status_other'; |
| 1316 |
$settings['fields'][$section_key][$field] = array( '', array( |
| 1317 |
'value_key'=>$field, |
| 1318 |
'option_key'=>$this->settings_page, |
| 1319 |
'label'=>__('Order Status : Other', 'wppizza-admin') |
| 1320 |
)); |
| 1321 |
$field = 'order_history_status_custom_1'; |
| 1322 |
$settings['fields'][$section_key][$field] = array( '', array( |
| 1323 |
'value_key'=>$field, |
| 1324 |
'option_key'=>$this->settings_page, |
| 1325 |
'label'=>__('Order Status : Custom 1', 'wppizza-admin') |
| 1326 |
)); |
| 1327 |
$field = 'order_history_status_custom_2'; |
| 1328 |
$settings['fields'][$section_key][$field] = array( '', array( |
| 1329 |
'value_key'=>$field, |
| 1330 |
'option_key'=>$this->settings_page, |
| 1331 |
'label'=>__('Order Status : Custom 2', 'wppizza-admin') |
| 1332 |
)); |
| 1333 |
$field = 'order_history_status_custom_3'; |
| 1334 |
$settings['fields'][$section_key][$field] = array( '', array( |
| 1335 |
'value_key'=>$field, |
| 1336 |
'option_key'=>$this->settings_page, |
| 1337 |
'label'=>__('Order Status : Custom 3', 'wppizza-admin') |
| 1338 |
)); |
| 1339 |
$field = 'order_history_status_custom_4'; |
| 1340 |
$settings['fields'][$section_key][$field] = array( '', array( |
| 1341 |
'value_key'=>$field, |
| 1342 |
'option_key'=>$this->settings_page, |
| 1343 |
'label'=>__('Order Status : Custom 4', 'wppizza-admin') |
| 1344 |
)); |
| 1345 |
|
| 1346 |
} |
| 1347 |
return $settings; |
| 1348 |
} |
| 1349 |
function admin_localization_admin_orderhistory_custom($settings, $sections, $fields, $inputs, $help){ |
| 1350 |
$section_key = 'orderhistory_custom'; |
| 1351 |
|
| 1352 |
/*sections*/ |
| 1353 |
if($sections){ |
| 1354 |
$settings['sections'][$section_key] = __('Admin Order History - Custom Statuses <a href="javascript:void(0)" class="wppizza-show-admin-help">(see help)</a>', 'wppizza-admin'); |
| 1355 |
} |
| 1356 |
/*fields*/ |
| 1357 |
if($fields){ |
| 1358 |
$field = 'order_history_custom_status_label'; |
| 1359 |
$settings['fields'][$section_key][$field] = array( '', array( |
| 1360 |
'value_key'=>$field, |
| 1361 |
'option_key'=>$this->settings_page, |
| 1362 |
'label'=>__('Custom Options Label', 'wppizza-admin') |
| 1363 |
)); |
| 1364 |
$field = 'order_history_custom_status_options'; |
| 1365 |
$settings['fields'][$section_key][$field] = array( '', array( |
| 1366 |
'value_key'=>$field, |
| 1367 |
'option_key'=>$this->settings_page, |
| 1368 |
'label'=>__('Custom Options [enter a comma separated list of options]', 'wppizza-admin') |
| 1369 |
)); |
| 1370 |
} |
| 1371 |
return $settings; |
| 1372 |
} |
| 1373 |
|
| 1374 |
|
| 1375 |
|
| 1376 |
|
| 1377 |
|
| 1378 |
/*------------------------------------------------------------------------------ |
| 1379 |
# [output option fields - setting page] |
| 1380 |
# @since 3.0 |
| 1381 |
# @return array() |
| 1382 |
------------------------------------------------------------------------------*/ |
| 1383 |
// function admin_options_fields_settings($wppizza_options, $options_key, $field, $label, $description){ |
| 1384 |
|
| 1385 |
|
| 1386 |
// if($field=='placeholder_img'){ |
| 1387 |
// print'<label>'; |
| 1388 |
// echo "<input id='".$field."' name='".WPPIZZA_SLUG."[".$options_key."][".$field."]' type='checkbox' ". checked($wppizza_options[$options_key][$field],true,false)." value='1' />"; |
| 1389 |
// print'' . $label . ''; |
| 1390 |
// print'</label>'; |
| 1391 |
// print'' . $description . ''; |
| 1392 |
// } |
| 1393 |
// if($field=='prettyPhoto' ){ |
| 1394 |
// print'<label>'; |
| 1395 |
// echo "<input id='".$field."' name='".WPPIZZA_SLUG."[".$options_key."][".$field."]' type='checkbox' ". checked($wppizza_options[$options_key][$field],true,false)." value='1' />"; |
| 1396 |
// print'' . $label . ''; |
| 1397 |
// print'</label>'; |
| 1398 |
// print'' . $description . ''; |
| 1399 |
// } |
| 1400 |
// if($field=='prettyPhotoStyle'){ |
| 1401 |
// print'<label>'; |
| 1402 |
// echo "<select id='".$field."' name='".WPPIZZA_SLUG."[".$options_key."][".$field."]'>"; |
| 1403 |
// echo "<option value='pp_default' ".selected($wppizza_options[$options_key][$field],"pp_default",false).">default</option>"; |
| 1404 |
// echo "<option value='light_rounded' ".selected($wppizza_options[$options_key][$field],"light_rounded",false).">light rounded</option>"; |
| 1405 |
// echo "<option value='dark_rounded' ".selected($wppizza_options[$options_key][$field],"dark_rounded",false).">dark rounded</option>"; |
| 1406 |
// echo "<option value='light_square' ".selected($wppizza_options[$options_key][$field],"light_square",false).">light square</option>"; |
| 1407 |
// echo "<option value='dark_square' ".selected($wppizza_options[$options_key][$field],"dark_square",false).">dark square</option>"; |
| 1408 |
// echo "<option value='facebook' ".selected($wppizza_options[$options_key][$field],"facebook",false).">facebook</option>"; |
| 1409 |
// echo "</select>"; |
| 1410 |
// print'' . $label . ''; |
| 1411 |
// print'</label>'; |
| 1412 |
// print'' . $description . ''; |
| 1413 |
// } |
| 1414 |
// } |
| 1415 |
|
| 1416 |
/**************************************************************** |
| 1417 |
* |
| 1418 |
* [insert default option on install] |
| 1419 |
* $parameter $options array() | filter passing on filtered options |
| 1420 |
* @since 3.0 |
| 1421 |
* @return array() |
| 1422 |
* using wppizza_textdomain here to distinctly find for poedit frontend values |
| 1423 |
****************************************************************/ |
| 1424 |
function options_default($options){ |
| 1425 |
|
| 1426 |
$options[$this->settings_page]['contains_additives'] = wppizza_textdomain('Contains additives', 'wppizza'); |
| 1427 |
$options[$this->settings_page]['add_to_cart'] = wppizza_textdomain('Add to cart', 'wppizza'); |
| 1428 |
$options[$this->settings_page]['alert_closed'] = wppizza_textdomain('Sorry, we are currently closed', 'wppizza'); |
| 1429 |
$options[$this->settings_page]['alert_choose_size'] = wppizza_textdomain('Please choose a size', 'wppizza'); |
| 1430 |
$options[$this->settings_page]['jquery_fb_add_to_cart_info'] = html_entity_decode(wppizza_textdomain('<div>✔</div>item added', 'wppizza')); |
| 1431 |
$options[$this->settings_page]['no_results_found'] = wppizza_textdomain('No results found', 'wppizza'); |
| 1432 |
$options[$this->settings_page]['uncategorised'] = wppizza_textdomain('Uncategorised', 'wppizza'); |
| 1433 |
$options[$this->settings_page]['previous'] = wppizza_textdomain('< Previous', 'wppizza'); |
| 1434 |
$options[$this->settings_page]['next'] = wppizza_textdomain('Next >', 'wppizza'); |
| 1435 |
/* Translators: 1,2,3: %s should not be translated here but used literally */ |
| 1436 |
$options[$this->settings_page]['pagination_info'] = wppizza_textdomain('%s - %s of %s', 'wppizza'); |
| 1437 |
$options[$this->settings_page]['closed'] = wppizza_textdomain('Currently closed', 'wppizza'); |
| 1438 |
/* Translators: 1: %s should not be translated here but used literally */ |
| 1439 |
$options[$this->settings_page]['closed_for_holidays'] = wppizza_textdomain('Closed for holidays. We will open again on %s.', 'wppizza'); |
| 1440 |
$options[$this->settings_page]['empty_cart'] = wppizza_textdomain('Empty cart', 'wppizza'); |
| 1441 |
$options[$this->settings_page]['view_cart'] = wppizza_textdomain('View cart', 'wppizza'); |
| 1442 |
$options[$this->settings_page]['cart_is_empty'] = wppizza_textdomain('Your cart is empty', 'wppizza'); |
| 1443 |
$options[$this->settings_page]['remove_from_cart'] = wppizza_textdomain('Remove from cart', 'wppizza'); |
| 1444 |
$options[$this->settings_page]['place_your_order'] = wppizza_textdomain('Place your order', 'wppizza'); |
| 1445 |
$options[$this->settings_page]['cart_checkout'] = wppizza_textdomain('Checkout', 'wppizza'); |
| 1446 |
$options[$this->settings_page]['cart_closed'] = wppizza_textdomain('We\'re closed', 'wppizza'); |
| 1447 |
$options[$this->settings_page]['history_no_previous_orders'] = wppizza_textdomain('You have no previous orders', 'wppizza'); |
| 1448 |
$options[$this->settings_page]['history_legend_order_details'] = wppizza_textdomain('Order Details', 'wppizza'); |
| 1449 |
$options[$this->settings_page]['history_legend_transaction_details'] = wppizza_textdomain('Transaction Details', 'wppizza'); |
| 1450 |
$options[$this->settings_page]['history_order_delivered_label'] = wppizza_textdomain('Delivered:', 'wppizza'); |
| 1451 |
$options[$this->settings_page]['your_order'] = wppizza_textdomain('Your order', 'wppizza'); |
| 1452 |
$options[$this->settings_page]['send_order'] = wppizza_textdomain('Send order', 'wppizza'); |
| 1453 |
$options[$this->settings_page]['update_order'] = wppizza_textdomain('Update order', 'wppizza'); |
| 1454 |
$options[$this->settings_page]['order_form_legend'] = wppizza_textdomain('Please enter the required information below', 'wppizza'); |
| 1455 |
$options[$this->settings_page]['order_page_handling'] = wppizza_textdomain('Handling charge', 'wppizza'); |
| 1456 |
$options[$this->settings_page]['order_page_handling_oncheckout'] = wppizza_textdomain('Calculated on checkout', 'wppizza'); |
| 1457 |
$options[$this->settings_page]['required_field'] = wppizza_textdomain('This is a required field', 'wppizza'); |
| 1458 |
$options[$this->settings_page]['required_field_email'] = wppizza_textdomain('Invalid email address', 'wppizza'); |
| 1459 |
$options[$this->settings_page]['required_field_decimal'] = wppizza_textdomain('Decimal numbers only please', 'wppizza'); |
| 1460 |
$options[$this->settings_page]['thank_you'] = wppizza_textdomain('Thank you', 'wppizza'); |
| 1461 |
$options[$this->settings_page]['thank_you_p'] = wppizza_textdomain('Thank you, we have received your order', 'wppizza'); |
| 1462 |
$options[$this->settings_page]['personal_information'] = wppizza_textdomain('Personal information', 'wppizza'); |
| 1463 |
$options[$this->settings_page]['order_details'] = wppizza_textdomain('Order details', 'wppizza'); |
| 1464 |
$options[$this->settings_page]['thank_you_error'] = wppizza_textdomain('Apologies. There was an error receiving your order. Please try again.', 'wppizza'); |
| 1465 |
$options[$this->settings_page]['thank_you_error_contact_us'] = wppizza_textdomain('Apologies. There was an error receiving your order. Please contact us.', 'wppizza'); |
| 1466 |
$options[$this->settings_page]['order_cancelled'] = wppizza_textdomain('Order cancelled', 'wppizza'); |
| 1467 |
$options[$this->settings_page]['order_cancelled_p'] = wppizza_textdomain('This order has been cancelled. Thank you.', 'wppizza'); |
| 1468 |
$options[$this->settings_page]['order_processing'] = wppizza_textdomain('Processing Payment', 'wppizza'); |
| 1469 |
$options[$this->settings_page]['order_processing_p'] = html_entity_decode(wppizza_textdomain('<p>We are processing your payment! This page will automatically refresh and check again in a few seconds. Please wait.....</p><p>If this page appears for more than a minute, please contact us stating the following order details</p>', 'wppizza')); |
| 1470 |
$options[$this->settings_page]['order_payment_pending'] = wppizza_textdomain('Payment Pending', 'wppizza'); |
| 1471 |
/* Translators: 1: %s should not be translated here but used literally */ |
| 1472 |
$options[$this->settings_page]['order_payment_pending_p'] = html_entity_decode(wppizza_textdomain('<p>Your payment has not yet been sent to us by your payment provider.</p><p>As soon as we have received your payment, a notification will be sent to you and we will process your order.</p><p><strong>Please note: we have no control over how quickly your provider will settle payments</strong></p><p>This page will refresh periodically, but you can also return to this page using <a href="%s">this link</a> to check back yourself later.</p>', 'wppizza')); |
| 1473 |
$options[$this->settings_page]['order_unconfirmed'] = wppizza_textdomain('Payment Accepted - Awaiting confirmation', 'wppizza'); |
| 1474 |
$options[$this->settings_page]['order_unconfirmed_p'] = html_entity_decode(wppizza_textdomain('<p>Your payment was accepted but has not yet been confirmed.</p><p>You will receive another email when your payment has been confirmed. Your order can not be processed until final confirmation has been received.</p><p>Please be patient</p>', 'wppizza')); |
| 1475 |
$options[$this->settings_page]['order_confirmed'] = wppizza_textdomain('Payment Confirmed', 'wppizza'); |
| 1476 |
$options[$this->settings_page]['order_confirmed_p'] = html_entity_decode(wppizza_textdomain('<p>Your payment has been confirmed. Thank you.</p>', 'wppizza')); |
| 1477 |
$options[$this->settings_page]['gateway_your_order'] = wppizza_textdomain('Your order at', 'wppizza') . ' '. get_bloginfo('name'); |
| 1478 |
$options[$this->settings_page]['gateway_enter_payment_details'] = wppizza_textdomain('Please enter your payment details', 'wppizza'); |
| 1479 |
$options[$this->settings_page]['order_not_found'] = wppizza_textdomain('Sorry, this order can not be found.', 'wppizza'); |
| 1480 |
$options[$this->settings_page]['label_return_to_shop'] = wppizza_textdomain('Return to shop', 'wppizza'); |
| 1481 |
$options[$this->settings_page]['order_ini_additional_info']=''; |
| 1482 |
$options[$this->settings_page]['update_profile'] = wppizza_textdomain('Update my user data with the details above', 'wppizza'); |
| 1483 |
$options[$this->settings_page]['tips'] = wppizza_textdomain('Tips / Gratuities', 'wppizza'); |
| 1484 |
$options[$this->settings_page]['loginout_have_account'] = wppizza_textdomain('Already registered ?', 'wppizza'); |
| 1485 |
$options[$this->settings_page]['register_option_label'] = wppizza_textdomain('Continue as :', 'wppizza'); |
| 1486 |
$options[$this->settings_page]['register_option_guest'] = wppizza_textdomain('Guest', 'wppizza'); |
| 1487 |
$options[$this->settings_page]['register_option_create_account'] = wppizza_textdomain('Create account', 'wppizza'); |
| 1488 |
$options[$this->settings_page]['register_option_create_account_info'] = wppizza_textdomain('Please ensure your email address is correct. A password will be emailed to you.', 'wppizza'); |
| 1489 |
$options[$this->settings_page]['register_option_create_account_error'] = wppizza_textdomain('This email address has already been registered. Please either <a href="#login">login</a>, use a different email address or continue as guest.', 'wppizza'); |
| 1490 |
$options[$this->settings_page]['itemised_label_quantity'] = wppizza_textdomain('Qty', 'wppizza'); |
| 1491 |
$options[$this->settings_page]['itemised_label_article'] = wppizza_textdomain('Article', 'wppizza'); |
| 1492 |
$options[$this->settings_page]['itemised_label_price'] = wppizza_textdomain('Price', 'wppizza'); |
| 1493 |
$options[$this->settings_page]['itemised_label_taxrate'] = wppizza_textdomain('Tax Rate', 'wppizza'); |
| 1494 |
$options[$this->settings_page]['itemised_label_total'] = wppizza_textdomain('Total', 'wppizza'); |
| 1495 |
//$options[$this->settings_page]['order_paid_by'] = wppizza_textdomain('Paid By:', 'wppizza'); |
| 1496 |
//$options[$this->settings_page]['order_email_footer']=''; |
| 1497 |
//$options[$this->settings_page]['spend'] = wppizza_textdomain('Spend', 'wppizza'); |
| 1498 |
//$options[$this->settings_page]['save'] = wppizza_textdomain('save', 'wppizza'); |
| 1499 |
/* Translators: 1: %s should not be translated here but used literally */ |
| 1500 |
$options[$this->settings_page]['spend_save'] = wppizza_textdomain('Spend %s save %s.', 'wppizza'); |
| 1501 |
$options[$this->settings_page]['free_delivery'] = wppizza_textdomain('Free Delivery', 'wppizza'); |
| 1502 |
$options[$this->settings_page]['delivery_charges'] = wppizza_textdomain('Delivery Charges', 'wppizza'); |
| 1503 |
$options[$this->settings_page]['delivery_charges_per_item'] = wppizza_textdomain('Delivery Charges Per Item', 'wppizza'); |
| 1504 |
$options[$this->settings_page]['discount'] = wppizza_textdomain('Discount', 'wppizza'); |
| 1505 |
/* Translators: 1: %s should not be translated here but used literally */ |
| 1506 |
$options[$this->settings_page]['item_tax_total'] = wppizza_textdomain('Sales Tax @ %s', 'wppizza'); |
| 1507 |
/* Translators: 1: %s should not be translated here but used literally */ |
| 1508 |
$options[$this->settings_page]['taxes_included'] = wppizza_textdomain('Incl. Tax @ %s', 'wppizza'); |
| 1509 |
$options[$this->settings_page]['handling_charges'] = wppizza_textdomain('Handling Charges', 'wppizza'); |
| 1510 |
/* Translators: 1: %s should not be translated here but used literally */ |
| 1511 |
$options[$this->settings_page]['shipping_tax'] = wppizza_textdomain('Shipping Tax @ %s', 'wppizza'); |
| 1512 |
$options[$this->settings_page]['tax_total'] = wppizza_textdomain('Tax Total', 'wppizza'); |
| 1513 |
$options[$this->settings_page]['tax_total_included'] = wppizza_textdomain('Taxes Included', 'wppizza'); |
| 1514 |
/* Translators: 1: %s should not be translated here but used literally */ |
| 1515 |
$options[$this->settings_page]['surcharge_percentage'] = wppizza_textdomain('Surcharge @ %s', 'wppizza'); |
| 1516 |
$options[$this->settings_page]['surcharge_fixed'] = wppizza_textdomain('Surcharge', 'wppizza'); |
| 1517 |
$options[$this->settings_page]['order_total'] = wppizza_textdomain('Total', 'wppizza'); |
| 1518 |
$options[$this->settings_page]['order_items'] = wppizza_textdomain('Your Items', 'wppizza'); |
| 1519 |
$options[$this->settings_page]['openinghours_closed'] = wppizza_textdomain('closed', 'wppizza'); |
| 1520 |
$options[$this->settings_page]['openinghours_24hrs'] = wppizza_textdomain('all day', 'wppizza'); |
| 1521 |
$options[$this->settings_page]['header_order_print_header']=''.get_bloginfo('name').''; |
| 1522 |
$options[$this->settings_page]['header_order_print_shop_address'] = ''.get_bloginfo('name').''; |
| 1523 |
$options[$this->settings_page]['header_order_print_customer_label'] = wppizza_textdomain('Customer Details / Delivery Address', 'wppizza'); |
| 1524 |
$options[$this->settings_page]['header_order_print_overview_label'] = wppizza_textdomain('Order', 'wppizza'); |
| 1525 |
$options[$this->settings_page]['header_order_print_itemised_article'] = wppizza_textdomain('Article', 'wppizza'); |
| 1526 |
$options[$this->settings_page]['header_order_print_itemised_price'] = wppizza_textdomain('Price', 'wppizza'); |
| 1527 |
$options[$this->settings_page]['header_order_print_itemised_quantity'] = wppizza_textdomain('Qty', 'wppizza'); |
| 1528 |
$options[$this->settings_page]['common_value_order_delivery'] = wppizza_textdomain('For Delivery', 'wppizza'); |
| 1529 |
$options[$this->settings_page]['common_value_order_pickup'] = wppizza_textdomain('For Pickup', 'wppizza'); |
| 1530 |
$options[$this->settings_page]['common_value_order_cash'] = wppizza_textdomain('Cash', 'wppizza'); |
| 1531 |
$options[$this->settings_page]['common_value_order_credit_card'] = wppizza_textdomain('Credit Card', 'wppizza'); |
| 1532 |
$options[$this->settings_page]['common_label_order_delivery_type'] = wppizza_textdomain('Delivery Type :', 'wppizza'); |
| 1533 |
$options[$this->settings_page]['common_label_order_wp_user_id'] = wppizza_textdomain('User ID :', 'wppizza'); |
| 1534 |
$options[$this->settings_page]['common_label_order_order_id'] = wppizza_textdomain('Order ID :', 'wppizza'); |
| 1535 |
$options[$this->settings_page]['common_label_order_currency'] = wppizza_textdomain('Currency :', 'wppizza'); |
| 1536 |
$options[$this->settings_page]['common_label_order_payment_type'] = wppizza_textdomain('Paid By :', 'wppizza'); |
| 1537 |
$options[$this->settings_page]['common_label_order_delivery_pickup_note'] = wppizza_textdomain('Note :', 'wppizza'); |
| 1538 |
$options[$this->settings_page]['common_label_order_payment_method'] = wppizza_textdomain('Payment Method :', 'wppizza'); |
| 1539 |
$options[$this->settings_page]['common_label_order_order_date'] = wppizza_textdomain('Order Date :', 'wppizza'); |
| 1540 |
$options[$this->settings_page]['common_label_order_transaction_id'] = wppizza_textdomain('Transaction Id :', 'wppizza'); |
| 1541 |
$options[$this->settings_page]['common_label_order_payment_outstanding'] = wppizza_textdomain('Payment Due :', 'wppizza'); |
| 1542 |
$options[$this->settings_page]['common_label_order_payment_unconfirmed'] = wppizza_textdomain('Unconfirmed Payment :', 'wppizza'); |
| 1543 |
$options[$this->settings_page]['common_label_order_payment_confirmed'] = wppizza_textdomain('Payment Confirmed :', 'wppizza'); |
| 1544 |
$options[$this->settings_page]['common_label_order_total'] = wppizza_textdomain('Total :', 'wppizza'); |
| 1545 |
$options[$this->settings_page]['common_label_order_refund'] = wppizza_textdomain('Refunded :', 'wppizza'); |
| 1546 |
$options[$this->settings_page]['templates_label_site'] = wppizza_textdomain('Site Details', 'wppizza'); |
| 1547 |
$options[$this->settings_page]['templates_label_ordervars'] = wppizza_textdomain('Overview', 'wppizza'); |
| 1548 |
$options[$this->settings_page]['templates_label_customer'] = wppizza_textdomain('Customer Details', 'wppizza'); |
| 1549 |
$options[$this->settings_page]['templates_label_order'] = wppizza_textdomain('Order Details', 'wppizza'); |
| 1550 |
$options[$this->settings_page]['templates_label_order_left'] = wppizza_textdomain('Qty', 'wppizza'); |
| 1551 |
$options[$this->settings_page]['templates_label_order_center'] = wppizza_textdomain('Article', 'wppizza'); |
| 1552 |
$options[$this->settings_page]['templates_label_order_right'] = wppizza_textdomain('Price', 'wppizza'); |
| 1553 |
$options[$this->settings_page]['templates_label_summary'] = wppizza_textdomain('Summary', 'wppizza'); |
| 1554 |
$options[$this->settings_page]['templates_user_is_guest'] = wppizza_textdomain('Guest', 'wppizza'); |
| 1555 |
$options[$this->settings_page]['templates_user_is_registered'] = wppizza_textdomain('Registered User', 'wppizza'); |
| 1556 |
$options[$this->settings_page]['templates_footer_note'] = ''; |
| 1557 |
$options[$this->settings_page]['templates_footer_note_print'] = ''; |
| 1558 |
$options[$this->settings_page]['widget_navigation_dropdown_placeholder'] = wppizza_textdomain(' - Our Menu - ', 'wppizza'); |
| 1559 |
$options[$this->settings_page]['user_profile_label_additional_info'] = wppizza_textdomain('Additional Information', 'wppizza'); |
| 1560 |
$options[$this->settings_page]['gateway_select_label'] = wppizza_textdomain('Please select your payment method:', 'wppizza'); |
| 1561 |
$options[$this->settings_page]['generic_placeholder_select'] = wppizza_textdomain('--- Please select ---', 'wppizza'); |
| 1562 |
$options[$this->settings_page]['generic_placeholder_checkbox_0'] = wppizza_textdomain('No', 'wppizza'); |
| 1563 |
$options[$this->settings_page]['generic_placeholder_checkbox_1'] = wppizza_textdomain('Yes', 'wppizza'); |
| 1564 |
$options[$this->settings_page]['admin_notify_new_order_label'] = wppizza_textdomain('New Order(s)', 'wppizza'); |
| 1565 |
$options[$this->settings_page]['failed_payment_try_again_link'] = wppizza_textdomain('Try Again', 'wppizza'); |
| 1566 |
$options[$this->settings_page]['generic_back_to_site'] = wppizza_textdomain('Back to Merchant Site', 'wppizza'); |
| 1567 |
$options[$this->settings_page]['generic_error_label'] = wppizza_textdomain('Error', 'wppizza'); |
| 1568 |
$options[$this->settings_page]['generic_error_details'] = wppizza_textdomain('Error Details', 'wppizza'); |
| 1569 |
$options[$this->settings_page]['localize_zero_price'] = wppizza_textdomain('Free', 'wppizza'); |
| 1570 |
/* Translators: 1: %s should not be translated here but used literally */ |
| 1571 |
$options[$this->settings_page]['privacy_terms_accept'] = html_entity_decode(wppizza_textdomain('I have read and accept the <a href="%s" target="_blank">Privacy Policy</a>', 'wppizza')); |
| 1572 |
$options[$this->settings_page]['privacy_terms_accepted'] = wppizza_textdomain('Privacy Policy accepted:', 'wppizza'); |
| 1573 |
$options[$this->settings_page]['order_history_status_new'] = wppizza_textdomain('New', 'wppizza'); |
| 1574 |
$options[$this->settings_page]['order_history_status_acknowledged'] = wppizza_textdomain('Acknowledged', 'wppizza'); |
| 1575 |
$options[$this->settings_page]['order_history_status_on_hold'] = wppizza_textdomain('On Hold', 'wppizza'); |
| 1576 |
$options[$this->settings_page]['order_history_status_processed'] = wppizza_textdomain('Processed', 'wppizza'); |
| 1577 |
$options[$this->settings_page]['order_history_status_delivered'] = wppizza_textdomain('Delivered', 'wppizza'); |
| 1578 |
$options[$this->settings_page]['order_history_status_rejected'] = wppizza_textdomain('Rejected', 'wppizza'); |
| 1579 |
$options[$this->settings_page]['order_history_status_refunded'] = wppizza_textdomain('Refunded', 'wppizza'); |
| 1580 |
$options[$this->settings_page]['order_history_status_other'] = wppizza_textdomain('Other', 'wppizza'); |
| 1581 |
$options[$this->settings_page]['order_history_status_custom_1'] = ''; |
| 1582 |
$options[$this->settings_page]['order_history_status_custom_2'] = ''; |
| 1583 |
$options[$this->settings_page]['order_history_status_custom_3'] = ''; |
| 1584 |
$options[$this->settings_page]['order_history_status_custom_4'] = ''; |
| 1585 |
$options[$this->settings_page]['order_history_custom_status_label'] = ''; |
| 1586 |
$options[$this->settings_page]['order_history_custom_status_options'] = ''; |
| 1587 |
|
| 1588 |
return $options; |
| 1589 |
} |
| 1590 |
|
| 1591 |
|
| 1592 |
/*------------------------------------------------------------------------------ |
| 1593 |
# [set localization keys wher html is allowed] |
| 1594 |
# array of items to allow html (such as tinymce textareas) |
| 1595 |
# @since 3.0 |
| 1596 |
# @return array() |
| 1597 |
------------------------------------------------------------------------------*/ |
| 1598 |
function options_validate_as_html($keys){ |
| 1599 |
|
| 1600 |
/* add keys */ |
| 1601 |
$keys[]='thank_you_p'; |
| 1602 |
$keys[]='order_ini_additional_info'; |
| 1603 |
$keys[]='jquery_fb_add_to_cart_info'; |
| 1604 |
$keys[]='register_option_create_account_info'; |
| 1605 |
$keys[]='register_option_create_account_error'; |
| 1606 |
$keys[]='order_processing_p'; |
| 1607 |
$keys[]='order_unconfirmed_p'; |
| 1608 |
$keys[]='order_payment_pending_p'; |
| 1609 |
$keys[]='header_order_print_shop_address'; |
| 1610 |
$keys[]='privacy_terms_accept'; |
| 1611 |
//$keys[]='order_email_footer'; |
| 1612 |
$keys[]='templates_footer_note'; |
| 1613 |
$keys[]='templates_footer_note_print'; |
| 1614 |
|
| 1615 |
return $keys; |
| 1616 |
} |
| 1617 |
|
| 1618 |
/*------------------------------------------------------------------------------ |
| 1619 |
# [validate options on save/update - localizations are automatically validated] |
| 1620 |
# |
| 1621 |
# @since 3.0 |
| 1622 |
# @return array() |
| 1623 |
------------------------------------------------------------------------------*/ |
| 1624 |
// function options_validate($options){ |
| 1625 |
// foreach($input[$this->settings_page] as $key=>$string){ |
| 1626 |
// $options[$this->settings_page][$key]=$string; |
| 1627 |
// } |
| 1628 |
// return $options; |
| 1629 |
// } |
| 1630 |
} |
| 1631 |
/*************************************************************** |
| 1632 |
* |
| 1633 |
* [ini] |
| 1634 |
* |
| 1635 |
***************************************************************/ |
| 1636 |
$WPPIZZA_MODULE_LOCALIZATION_COMMON = new WPPIZZA_MODULE_LOCALIZATION_COMMON(); |
| 1637 |
?> |