Changeset 616171
- Timestamp:
- 10/23/2012 12:43:57 PM (13 years ago)
- Location:
- wpgeocode/trunk
- Files:
-
- 2 edited
-
readme.txt (modified) (2 diffs)
-
wpgeocode.php (modified) (7 diffs)
Legend:
- Unmodified
- Added
- Removed
-
wpgeocode/trunk/readme.txt
r615816 r616171 88 88 == Change Log == 89 89 90 = 1.0.6 = 91 * Fix conditional shortcode wpgc_is_not_country_codes 92 90 93 = 1.0.5 = 91 94 * Add support for multiple locations (i.e. cities, states, etc.) in conditional shortcodes eg: [wpgc_is_cities cities="one,two,three"] … … 124 127 = 1.0.5 = 125 128 * Multiple location conditional shortcodes 129 130 = 1.0.6 = 131 * Fixed conditional shortcode for is_not_country_codes -
wpgeocode/trunk/wpgeocode.php
r615816 r616171 5 5 Tags: geocode, geotagging, geolocation, geotags, latitude, longitude, city, state, geomarketing, geolocation marketing 6 6 Description: Use WPGeocode to customize the content of your blog based on the location of your readers. 7 Version: 1.0. 57 Version: 1.0.6 8 8 Author: Michael Lynn 9 9 Author URI: http://www.mlynn.org/ … … 34 34 // $log->write("test"); 35 35 36 function wpgc_country_list($atts, $content="") { 37 return wpgc_list_all_countries(); 38 } 36 39 function wpgc_shortcode_env($atts, $content="") { 37 40 return do_shortcode(wpgc_conditional_shortcode($atts, $content, 'env')); … … 354 357 break; 355 358 case 'is_not_country_codes': 356 $found=wpgc_csv_find($country_codes,$loc_arr['country_code s']);359 $found=wpgc_csv_find($country_codes,$loc_arr['country_code']); 357 360 if ($found==false) { 358 361 return $content; … … 434 437 } 435 438 439 add_shortcode("wpgc_country_list", "wpgc_country_list"); 436 440 add_shortcode("wpgc_env", "wpgc_shortcode_env"); 437 441 add_shortcode("wpgc_database_date", "wpgc_shortcode_database_date"); … … 563 567 <li> [wpgc_is_city_and_state city="Yardley" state_code="PA"] 564 568 <li> [wpgc_is_ip ip="xx.xx.xx.xx"] 569 <li> [wpgc_is_ips ip="xx.xx.xx.xx"] 565 570 <li> [wpgc_is_ips ips="xx.xx.xx.xx,aa.bb.cc.dd"] 566 571 <li> [wpgc_is_not_ip ip="xx.xx.xx.xx"] … … 577 582 <li> [wpgc_is_not_country_name country_name=""] 578 583 <li> [wpgc_is_not_country_code country_code=""] 584 <li> [wpgc_is_not_country_codes country_codes=""] 579 585 <li> [wpgc_is_not_state_code state_code=""] 580 586 </ul> … … 969 975 return false; 970 976 } // end function wpgc_find_string_in_array 977 function wpgc_list_all_countries() { 978 979 $country_list = array( 980 "Afghanistan", 981 "Albania", 982 "Algeria", 983 "Andorra", 984 "Angola", 985 "Antigua and Barbuda", 986 "Argentina", 987 "Armenia", 988 "Australia", 989 "Austria", 990 "Azerbaijan", 991 "Bahamas", 992 "Bahrain", 993 "Bangladesh", 994 "Barbados", 995 "Belarus", 996 "Belgium", 997 "Belize", 998 "Benin", 999 "Bhutan", 1000 "Bolivia", 1001 "Bosnia and Herzegovina", 1002 "Botswana", 1003 "Brazil", 1004 "Brunei", 1005 "Bulgaria", 1006 "Burkina Faso", 1007 "Burundi", 1008 "Cambodia", 1009 "Cameroon", 1010 "Canada", 1011 "Cape Verde", 1012 "Central African Republic", 1013 "Chad", 1014 "Chile", 1015 "China", 1016 "Colombi", 1017 "Comoros", 1018 "Congo (Brazzaville)", 1019 "Congo", 1020 "Costa Rica", 1021 "Cote d'Ivoire", 1022 "Croatia", 1023 "Cuba", 1024 "Cyprus", 1025 "Czech Republic", 1026 "Denmark", 1027 "Djibouti", 1028 "Dominica", 1029 "Dominican Republic", 1030 "East Timor (Timor Timur)", 1031 "Ecuador", 1032 "Egypt", 1033 "El Salvador", 1034 "Equatorial Guinea", 1035 "Eritrea", 1036 "Estonia", 1037 "Ethiopia", 1038 "Fiji", 1039 "Finland", 1040 "France", 1041 "Gabon", 1042 "Gambia, The", 1043 "Georgia", 1044 "Germany", 1045 "Ghana", 1046 "Greece", 1047 "Grenada", 1048 "Guatemala", 1049 "Guinea", 1050 "Guinea-Bissau", 1051 "Guyana", 1052 "Haiti", 1053 "Honduras", 1054 "Hungary", 1055 "Iceland", 1056 "India", 1057 "Indonesia", 1058 "Iran", 1059 "Iraq", 1060 "Ireland", 1061 "Israel", 1062 "Italy", 1063 "Jamaica", 1064 "Japan", 1065 "Jordan", 1066 "Kazakhstan", 1067 "Kenya", 1068 "Kiribati", 1069 "Korea, North", 1070 "Korea, South", 1071 "Kuwait", 1072 "Kyrgyzstan", 1073 "Laos", 1074 "Latvia", 1075 "Lebanon", 1076 "Lesotho", 1077 "Liberia", 1078 "Libya", 1079 "Liechtenstein", 1080 "Lithuania", 1081 "Luxembourg", 1082 "Macedonia", 1083 "Madagascar", 1084 "Malawi", 1085 "Malaysia", 1086 "Maldives", 1087 "Mali", 1088 "Malta", 1089 "Marshall Islands", 1090 "Mauritania", 1091 "Mauritius", 1092 "Mexico", 1093 "Micronesia", 1094 "Moldova", 1095 "Monaco", 1096 "Mongolia", 1097 "Morocco", 1098 "Mozambique", 1099 "Myanmar", 1100 "Namibia", 1101 "Nauru", 1102 "Nepa", 1103 "Netherlands", 1104 "New Zealand", 1105 "Nicaragua", 1106 "Niger", 1107 "Nigeria", 1108 "Norway", 1109 "Oman", 1110 "Pakistan", 1111 "Palau", 1112 "Panama", 1113 "Papua New Guinea", 1114 "Paraguay", 1115 "Peru", 1116 "Philippines", 1117 "Poland", 1118 "Portugal", 1119 "Qatar", 1120 "Romania", 1121 "Russia", 1122 "Rwanda", 1123 "Saint Kitts and Nevis", 1124 "Saint Lucia", 1125 "Saint Vincent", 1126 "Samoa", 1127 "San Marino", 1128 "Sao Tome and Principe", 1129 "Saudi Arabia", 1130 "Senegal", 1131 "Serbia and Montenegro", 1132 "Seychelles", 1133 "Sierra Leone", 1134 "Singapore", 1135 "Slovakia", 1136 "Slovenia", 1137 "Solomon Islands", 1138 "Somalia", 1139 "South Africa", 1140 "Spain", 1141 "Sri Lanka", 1142 "Sudan", 1143 "Suriname", 1144 "Swaziland", 1145 "Sweden", 1146 "Switzerland", 1147 "Syria", 1148 "Taiwan", 1149 "Tajikistan", 1150 "Tanzania", 1151 "Thailand", 1152 "Togo", 1153 "Tonga", 1154 "Trinidad and Tobago", 1155 "Tunisia", 1156 "Turkey", 1157 "Turkmenistan", 1158 "Tuvalu", 1159 "Uganda", 1160 "Ukraine", 1161 "United Arab Emirates", 1162 "United Kingdom", 1163 "United States", 1164 "Uruguay", 1165 "Uzbekistan", 1166 "Vanuatu", 1167 "Vatican City", 1168 "Venezuela", 1169 "Vietnam", 1170 "Yemen", 1171 "Zambia", 1172 "Zimbabwe" 1173 ); 1174 return implode("<BR>",$country_list); 1175 }
Note: See TracChangeset
for help on using the changeset viewer.