| 1 |
<?php |
| 2 |
/* |
| 3 |
Functions that should be included first |
| 4 |
*/ |
| 5 |
function usces_filter_locale($locale){ |
| 6 |
if( !is_admin() |
| 7 |
|| ( isset($_POST['action']) && isset($_POST['mode']) && 'order_item_ajax' == $_POST['action'] && in_array($_POST['mode'], array('completionMail', 'orderConfirmMail', 'changeConfirmMail', 'receiptConfirmMail', 'mitumoriConfirmMail', 'cancelConfirmMail', 'otherConfirmMail'))) |
| 8 |
|| ( isset($_REQUEST['order_action']) && 'pdfout' == $_REQUEST['order_action'] ) |
| 9 |
){ |
| 10 |
$usces_options = get_option('usces'); |
| 11 |
if( isset($usces_options['system']['front_lang']) && !empty($usces_options['system']['front_lang']) ){ |
| 12 |
return $usces_options['system']['front_lang']; |
| 13 |
}else{ |
| 14 |
return $locale; |
| 15 |
} |
| 16 |
}else{ |
| 17 |
return $locale; |
| 18 |
} |
| 19 |
} |
| 20 |
?> |