Guest User

Untitled

a guest
May 27th, 2018
155
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.05 KB | None | 0 0
  1. <?php // don't include this line in your functions.php, since it already starts with it.
  2.  
  3. function _si_add_local_for_client( $client_fields = array() ) {
  4. $client_fields['money_format']['options']['ngn'] = 'Naira';
  5. return $client_fields;
  6. }
  7. add_filter( 'si_client_adv_form_fields', '_si_add_local_for_client' );
  8.  
  9. function _si_set_localeconv( $localeconv = array(), $locale = '' ) {
  10. switch ( $locale ) {
  11. case 'ngn':
  12. $localeconv = ngn_local_array();
  13. break;
  14. }
  15. return $localeconv;
  16. };
  17. add_filter( 'si_localeconv', '_si_set_localeconv', 10, 2 );
  18.  
  19. function ngn_local_array() {
  20. return array(
  21. 'decimal_point' => '.',
  22. 'thousands_sep' => '',
  23. 'int_curr_symbol' => 'NGN',
  24. 'currency_symbol' => '₦',
  25. 'mon_decimal_point' => '.',
  26. 'mon_thousands_sep' => ',',
  27. 'positive_sign' => '',
  28. 'negative_sign' => '-',
  29. 'int_frac_digits' => 2,
  30. 'frac_digits' => 2,
  31. 'p_cs_precedes' => 1,
  32. 'p_sep_by_space' => 0,
  33. 'n_cs_precedes' => 1,
  34. 'n_sep_by_space' => 0,
  35. 'p_sign_posn' => 1,
  36. 'n_sign_posn' => 1,
  37. 'grouping' => array(),
  38. 'mon_grouping' => array( 3, 3 ),
  39. );
  40. }
Add Comment
Please, Sign In to add comment