Changeset 2402889
- Timestamp:
- 10/20/2020 02:39:41 AM (5 years ago)
- Location:
- woocommerce-arabic-currencies
- Files:
-
- 28 added
- 3 edited
-
tags/1.2.6/lang (added)
-
tags/1.2.6/lang/woocommerce-arabic-currencies-ar.mo (added)
-
tags/1.2.6/lang/woocommerce-arabic-currencies-ar.po (added)
-
tags/1.2.6/lang/woocommerce-arabic-currencies-ary.mo (added)
-
tags/1.2.6/lang/woocommerce-arabic-currencies-ary.po (added)
-
tags/1.2.6/lang/woocommerce-arabic-currencies.pot (added)
-
tags/1.2.6/readme.txt (added)
-
tags/1.2.6/screenshot-1.png (added)
-
tags/1.2.6/woocommerce-arabic-currencies.php (added)
-
tags/1.2.7/readme.txt (modified) (1 diff)
-
tags/1.2.8 (added)
-
tags/1.2.8/locales (added)
-
tags/1.2.8/locales/woocommerce-arabic-currencies-ar.mo (added)
-
tags/1.2.8/locales/woocommerce-arabic-currencies-ar.po (added)
-
tags/1.2.8/locales/woocommerce-arabic-currencies-ary.mo (added)
-
tags/1.2.8/locales/woocommerce-arabic-currencies-ary.po (added)
-
tags/1.2.8/locales/woocommerce-arabic-currencies.pot (added)
-
tags/1.2.8/readme.txt (added)
-
tags/1.2.8/screenshot-1.jpg (added)
-
tags/1.2.8/screenshot-2.jpg (added)
-
tags/1.2.8/woocommerce-arabic-currencies.php (added)
-
trunk/locales (added)
-
trunk/locales/woocommerce-arabic-currencies-ar.mo (added)
-
trunk/locales/woocommerce-arabic-currencies-ar.po (added)
-
trunk/locales/woocommerce-arabic-currencies-ary.mo (added)
-
trunk/locales/woocommerce-arabic-currencies-ary.po (added)
-
trunk/locales/woocommerce-arabic-currencies.pot (added)
-
trunk/readme.txt (modified) (4 diffs)
-
trunk/screenshot-1.jpg (added)
-
trunk/screenshot-2.jpg (added)
-
trunk/woocommerce-arabic-currencies.php (modified) (5 diffs)
Legend:
- Unmodified
- Added
- Removed
-
woocommerce-arabic-currencies/tags/1.2.7/readme.txt
r2361852 r2402889 86 86 = 1.2.6 = 87 87 * Tested up to WordPress 5.3 & WooCommerce 3.9 88 = 1.2.7 = 89 * Tested up in WordPress 5.5 and WooCommerce 4.3 -
woocommerce-arabic-currencies/trunk/readme.txt
r2361852 r2402889 1 1 === WooCommerce Arabic Currencies === 2 2 Contributors: sa3idho 3 Tags: woocommerce, woo commerce, woo, currencies, ecommerce, arabic currencies, Dirham, Pound, Dinars, Dinar, Riyal, Ouguiya, shilling, Djibouti, Franc, Saudi Riyal4 Requires at least: 5. 25 Tested up to: 5.5 3 Tags: woocommerce,rtl, woo, currencies, ecommerce, arabic currencies, Dirham, Pound, Dinars, Dinar, Riyal, Ouguiya, shilling, Djibouti, Franc, Saudi Riyal 4 Requires at least: 5.3 5 Tested up to: 5.5.1 6 6 Requires PHP: 7.0 7 Stable tag: 1.2. 77 Stable tag: 1.2.8 8 8 License: GPLv3 9 9 License URI: https://www.gnu.org/licenses/gpl-3.0.html … … 17 17 18 18 * Twenty-one Arab currency. 19 - Algerian Dinar 20 - Bahraini Dinar 21 - Comorian Franc 22 - Djibouti Franc 23 - Egyptian Pound 24 - Emirati Dirham 25 - Iraqi Dinars 26 - Jordanian Dinar 27 - Kuwaiti Dinar 28 - Lebanese Pound 29 - Libyan Dinar 30 - Mauritania Ouguiya 19 31 - Moroccan Dirham 20 - Egyptian Pound21 - Iraqi Dinars22 - Syrian Pound23 - Lebanese Pound24 - Jordanian Dinar25 - Yemen Riyal26 - Libyan Dinar27 - Sudanese Pound28 - Tunisian Dinar29 - Algerian Dinar30 - Mauritania Ouguiya31 - Emirati Dirham32 - Somali shilling33 - Djibouti Franc34 - Comorian Franc35 - Bahraini Dinar36 - Kuwaiti Dinar37 32 - Omani Rial 38 33 - Qatari Riyal 39 34 - Saudi Riyal 35 - Somali shilling 36 - Sudanese Pound 37 - Syrian Pound 38 - Tunisian Dinar 39 - Yemen Riyal 40 40 41 41 * Add all currencies direct to list woocommerce for currencies. … … 64 64 65 65 == Screenshots == 66 1. the list of Arab currencies in WooCommerce settings. 66 1. The list of arabic currencies in WooCommerce settings (Arabic WordPress site). 67 2. The list of arabic currencies in WooCommerce settings (English WordPress site). 67 68 68 69 == Changelog == … … 86 87 = 1.2.6 = 87 88 * Tested up to WordPress 5.3 & WooCommerce 3.9 89 = 1.2.7 = 90 * Tested up in WordPress 5.5 and WooCommerce 4.3 91 = 1.2.8 - 2020-10-20 = 92 * Tested up in WordPress 5.5.1 and WooCommerce 4.6 93 * Add new Screenshot 94 * Rename translation folder to "locales" 95 * Create link to settings page from plugins screen -
woocommerce-arabic-currencies/trunk/woocommerce-arabic-currencies.php
r2361852 r2402889 2 2 /** 3 3 * Plugin Name: WooCommerce Arabic Currencies 4 * Plugin URI: https://saidelbakkali.com/ 5 * Description: This plugin for add custom currencies to woocommerce but for arabic currencies. 6 * Version: 1.2.7 7 * Author: Said El Bakkali 8 * Author URI: https://saidelbakkali.com/ 9 * Text Domain: woocommerce-arabic-currencies 10 * Domain Path: /lang/ 11 * Requires at least: 5.2 12 * Requires PHP: 7.0 13 * License: GPL2 4 * 5 * @package WooCommerce_Arabic_Currencies 6 * @author Said El Bakkali <contact@saidelbakkali.com> 7 * @license GPLv3 8 * @since 1.0.0 9 * 10 * @wordpress-plugin 11 * Plugin URI: https://github.com/SaidElBakkali/woocommerce-arabic-currencies 12 * Description: This plugin adds custom arabic currenciesfor WooCommerce. 13 * Version: 1.2.8 14 * Author: Said El Bakkali 15 * Author URI: https://saidelbakkali.com/ 16 * Text Domain: woocommerce-arabic-currencies 17 * Domain Path: /locales/ 18 * Requires at least: 5.3 19 * Requires PHP: 7.0 14 20 * 15 21 * @package woocommerce_arabic_currencies … … 20 26 } 21 27 22 include_once( ABSPATH . 'wp-admin/includes/plugin.php' );28 require_once ABSPATH . 'wp-admin/includes/plugin.php'; 23 29 24 30 /** … … 33 39 34 40 /** 35 * Function woocommerce_arabic_currencies description41 * Adds custom arabic currencies to WooCommerce 36 42 * 37 * @param string$currencies43 * @param array $currencies 38 44 * @return array 45 * 46 * @since 1.0.0 39 47 */ 40 48 function woocommerce_arabic_currencies( $currencies ) { 41 49 50 $currencies['AED'] = esc_html__( 'Emirati Dirham', 'woocommerce-arabic-currencies' ); 51 $currencies['BHD'] = esc_html__( 'Bahraini Dinar', 'woocommerce-arabic-currencies' ); 52 $currencies['DZD'] = esc_html__( 'Algerian Dinar', 'woocommerce-arabic-currencies' ); 53 $currencies['EGP'] = esc_html__( 'Egyptian Pound', 'woocommerce-arabic-currencies' ); 54 $currencies['FDJ'] = esc_html__( 'Djibouti Franc', 'woocommerce-arabic-currencies' ); 55 $currencies['IQD'] = esc_html__( 'Iraqi Dinars', 'woocommerce-arabic-currencies' ); 56 $currencies['JOD'] = esc_html__( 'Jordanian Dinar', 'woocommerce-arabic-currencies' ); 57 $currencies['KMF'] = esc_html__( 'Comorian Franc', 'woocommerce-arabic-currencies' ); 58 $currencies['KWD'] = esc_html__( 'Kuwaiti Dinar', 'woocommerce-arabic-currencies' ); 59 $currencies['LBP'] = esc_html__( 'Lebanese Pound', 'woocommerce-arabic-currencies' ); 60 $currencies['LYD'] = esc_html__( 'Libyan Dinar', 'woocommerce-arabic-currencies' ); 42 61 $currencies['MAD'] = esc_html__( 'Moroccan Dirham', 'woocommerce-arabic-currencies' ); 43 $currencies['EGP'] = esc_html__( 'Egyptian Pound', 'woocommerce-arabic-currencies' );44 $currencies['IQD'] = esc_html__( 'Iraqi Dinars', 'woocommerce-arabic-currencies' );45 $currencies['SYP'] = esc_html__( 'Syrian Pound', 'woocommerce-arabic-currencies' );46 $currencies['LBP'] = esc_html__( 'Lebanese Pound', 'woocommerce-arabic-currencies' );47 $currencies['JOD'] = esc_html__( 'Jordanian Dinar', 'woocommerce-arabic-currencies' );48 $currencies['YER'] = esc_html__( 'Yemen Riyal', 'woocommerce-arabic-currencies' );49 $currencies['LYD'] = esc_html__( 'Libyan Dinar', 'woocommerce-arabic-currencies' );50 $currencies['SDG'] = esc_html__( 'Sudanese Pound', 'woocommerce-arabic-currencies' );51 $currencies['TND'] = esc_html__( 'Tunisian Dinar', 'woocommerce-arabic-currencies' );52 $currencies['DZD'] = esc_html__( 'Algerian Dinar', 'woocommerce-arabic-currencies' );53 62 $currencies['MRO'] = esc_html__( 'Mauritania Ouguiya', 'woocommerce-arabic-currencies' ); 54 $currencies['AED'] = esc_html__( 'Emirati Dirham', 'woocommerce-arabic-currencies' );55 $currencies['SOS'] = esc_html__( 'Somali shilling ', 'woocommerce-arabic-currencies' );56 $currencies['FDJ'] = esc_html__( 'Djibouti Franc', 'woocommerce-arabic-currencies' );57 $currencies['KMF'] = esc_html__( 'Comorian Franc', 'woocommerce-arabic-currencies' );58 $currencies['BHD'] = esc_html__( 'Bahraini Dinar', 'woocommerce-arabic-currencies' );59 $currencies['KWD'] = esc_html__( 'Kuwaiti Dinar', 'woocommerce-arabic-currencies' );60 63 $currencies['OMR'] = esc_html__( 'Omani Rial', 'woocommerce-arabic-currencies' ); 61 64 $currencies['QAR'] = esc_html__( 'Qatari Riyal', 'woocommerce-arabic-currencies' ); 62 65 $currencies['SAR'] = esc_html__( 'Saudi Riyal', 'woocommerce-arabic-currencies' ); 63 return $currencies; 66 $currencies['SDG'] = esc_html__( 'Sudanese Pound', 'woocommerce-arabic-currencies' ); 67 $currencies['SOS'] = esc_html__( 'Somali shilling', 'woocommerce-arabic-currencies' ); 68 $currencies['SYP'] = esc_html__( 'Syrian Pound', 'woocommerce-arabic-currencies' ); 69 $currencies['TND'] = esc_html__( 'Tunisian Dinar', 'woocommerce-arabic-currencies' ); 70 $currencies['YER'] = esc_html__( 'Yemen Riyal', 'woocommerce-arabic-currencies' ); 71 72 return $currencies; 64 73 } 65 74 … … 67 76 * Add arabic currencies symbols 68 77 */ 69 70 78 add_filter( 'woocommerce_currency_symbol', 'woocommerce_arabic_currencies_symbol', 10, 2 ); 71 79 72 80 /** 73 * Function woocommerce_arabic_currencies_symbol description81 * Adds custom arabic currencies symbols to WooCommerce 74 82 * 75 83 * @param string $currency_symbol 76 84 * @param string $currency 77 85 * @return string 86 * 87 * @since 1.0.0 78 88 */ 79 89 function woocommerce_arabic_currencies_symbol( $currency_symbol, $currency ) { 80 90 switch ( $currency ) { 81 case 'MAD': $currency_symbol = esc_html__( 'MAD', 'woocommerce-arabic-currencies' ); 82 break; 83 case 'EGP': $currency_symbol = esc_html__( 'EGP', 'woocommerce-arabic-currencies' ); 84 break; 85 case 'IQD': $currency_symbol = esc_html__( 'IQD', 'woocommerce-arabic-currencies' ); 86 break; 87 case 'SYP': $currency_symbol = esc_html__( 'SYP', 'woocommerce-arabic-currencies' ); 88 break; 89 case 'LBP': $currency_symbol = esc_html__( 'LBP', 'woocommerce-arabic-currencies' ); 90 break; 91 case 'JOD': $currency_symbol = esc_html__( 'JOD', 'woocommerce-arabic-currencies' ); 92 break; 93 case 'YER': $currency_symbol = esc_html__( 'YER', 'woocommerce-arabic-currencies' ); 94 break; 95 case 'LYD': $currency_symbol = esc_html__( 'LYD', 'woocommerce-arabic-currencies' ); 96 break; 97 case 'SDG': $currency_symbol = esc_html__( 'SDG', 'woocommerce-arabic-currencies' ); 98 break; 99 case 'TND': $currency_symbol = esc_html__( 'TND', 'woocommerce-arabic-currencies' ); 100 break; 101 case 'DZD': $currency_symbol = esc_html__( 'DZD', 'woocommerce-arabic-currencies' ); 102 break; 103 case 'MRO': $currency_symbol = esc_html__( 'MRO', 'woocommerce-arabic-currencies' ); 104 break; 105 case 'AED': $currency_symbol = esc_html__( 'AED', 'woocommerce-arabic-currencies' ); 106 break; 107 case 'SOS': $currency_symbol = esc_html__( 'SOS', 'woocommerce-arabic-currencies' ); 108 break; 109 case 'FDJ': $currency_symbol = esc_html__( 'FDJ', 'woocommerce-arabic-currencies' ); 110 break; 111 case 'KMF': $currency_symbol = esc_html__( 'KMF', 'woocommerce-arabic-currencies' ); 112 break; 113 case 'BHD': $currency_symbol = esc_html__( 'BHD', 'woocommerce-arabic-currencies' ); 114 break; 115 case 'KWD': $currency_symbol = esc_html__( 'KWD', 'woocommerce-arabic-currencies' ); 116 break; 117 case 'OMR': $currency_symbol = esc_html__( 'OMR', 'woocommerce-arabic-currencies' ); 118 break; 119 case 'QAR': $currency_symbol = esc_html__( 'QAR', 'woocommerce-arabic-currencies' ); 120 break; 121 case 'SAR': $currency_symbol = esc_html__( 'SAR', 'woocommerce-arabic-currencies' ); 122 break; 123 }// End switch(). 91 case 'MAD': 92 $currency_symbol = esc_html__( 'MAD', 'woocommerce-arabic-currencies' ); 93 break; 94 case 'EGP': 95 $currency_symbol = esc_html__( 'EGP', 'woocommerce-arabic-currencies' ); 96 break; 97 case 'IQD': 98 $currency_symbol = esc_html__( 'IQD', 'woocommerce-arabic-currencies' ); 99 break; 100 case 'SYP': 101 $currency_symbol = esc_html__( 'SYP', 'woocommerce-arabic-currencies' ); 102 break; 103 case 'LBP': 104 $currency_symbol = esc_html__( 'LBP', 'woocommerce-arabic-currencies' ); 105 break; 106 case 'JOD': 107 $currency_symbol = esc_html__( 'JOD', 'woocommerce-arabic-currencies' ); 108 break; 109 case 'YER': 110 $currency_symbol = esc_html__( 'YER', 'woocommerce-arabic-currencies' ); 111 break; 112 case 'LYD': 113 $currency_symbol = esc_html__( 'LYD', 'woocommerce-arabic-currencies' ); 114 break; 115 case 'SDG': 116 $currency_symbol = esc_html__( 'SDG', 'woocommerce-arabic-currencies' ); 117 break; 118 case 'TND': 119 $currency_symbol = esc_html__( 'TND', 'woocommerce-arabic-currencies' ); 120 break; 121 case 'DZD': 122 $currency_symbol = esc_html__( 'DZD', 'woocommerce-arabic-currencies' ); 123 break; 124 case 'MRO': 125 $currency_symbol = esc_html__( 'MRO', 'woocommerce-arabic-currencies' ); 126 break; 127 case 'AED': 128 $currency_symbol = esc_html__( 'AED', 'woocommerce-arabic-currencies' ); 129 break; 130 case 'SOS': 131 $currency_symbol = esc_html__( 'SOS', 'woocommerce-arabic-currencies' ); 132 break; 133 case 'FDJ': 134 $currency_symbol = esc_html__( 'FDJ', 'woocommerce-arabic-currencies' ); 135 break; 136 case 'KMF': 137 $currency_symbol = esc_html__( 'KMF', 'woocommerce-arabic-currencies' ); 138 break; 139 case 'BHD': 140 $currency_symbol = esc_html__( 'BHD', 'woocommerce-arabic-currencies' ); 141 break; 142 case 'KWD': 143 $currency_symbol = esc_html__( 'KWD', 'woocommerce-arabic-currencies' ); 144 break; 145 case 'OMR': 146 $currency_symbol = esc_html__( 'OMR', 'woocommerce-arabic-currencies' ); 147 break; 148 case 'QAR': 149 $currency_symbol = esc_html__( 'QAR', 'woocommerce-arabic-currencies' ); 150 break; 151 case 'SAR': 152 $currency_symbol = esc_html__( 'SAR', 'woocommerce-arabic-currencies' ); 153 break; 154 } 124 155 return $currency_symbol; 125 156 } … … 132 163 /** 133 164 * Load plugin textdomain. 165 * 166 * @since 1.0.0 134 167 */ 135 168 function woocommerce_arabic_currencies_translation() { 136 169 137 load_plugin_textdomain( 'woocommerce-arabic-currencies', false, dirname( plugin_basename( __FILE__ ) ) . '/l ang' );170 load_plugin_textdomain( 'woocommerce-arabic-currencies', false, dirname( plugin_basename( __FILE__ ) ) . '/locales' ); 138 171 139 172 } 140 } // End if(). 173 174 // Create link to settings page from plugins screen. 175 add_filter( 176 'plugin_action_links_' . plugin_basename( __FILE__ ), 177 function ( $links ) { 178 $mylinks = array( 179 sprintf( 180 '<a href="%s">%s</a>', 181 admin_url( 'admin.php?page=wc-settings#pricing_options-description' ), 182 esc_html__( 'Settings', 'woocommerce-arabic-currencies' ) 183 ), 184 ); 185 return array_merge( $links, $mylinks ); 186 } 187 ); 188 }
Note: See TracChangeset
for help on using the changeset viewer.