Plugin Directory

Changeset 616171


Ignore:
Timestamp:
10/23/2012 12:43:57 PM (13 years ago)
Author:
mikelynn
Message:

Fix wpgc_is_not_country_codes shortcode

Location:
wpgeocode/trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • wpgeocode/trunk/readme.txt

    r615816 r616171  
    8888== Change Log ==
    8989
     90= 1.0.6 =
     91* Fix conditional shortcode wpgc_is_not_country_codes
     92
    9093= 1.0.5 =
    9194* Add support for multiple locations (i.e. cities, states, etc.) in conditional shortcodes eg: [wpgc_is_cities cities="one,two,three"]
     
    124127= 1.0.5 =
    125128* Multiple location conditional shortcodes
     129
     130= 1.0.6 =
     131* Fixed conditional shortcode for is_not_country_codes
  • wpgeocode/trunk/wpgeocode.php

    r615816 r616171  
    55Tags: geocode, geotagging, geolocation, geotags, latitude, longitude, city, state, geomarketing, geolocation marketing
    66Description: Use WPGeocode to customize the content of your blog based on the location of your readers.
    7 Version: 1.0.5
     7Version: 1.0.6
    88Author: Michael Lynn
    99Author URI: http://www.mlynn.org/
     
    3434// $log->write("test");
    3535
     36function wpgc_country_list($atts, $content="") {
     37    return wpgc_list_all_countries();
     38}
    3639function wpgc_shortcode_env($atts, $content="") {
    3740    return do_shortcode(wpgc_conditional_shortcode($atts, $content, 'env'));
     
    354357            break;
    355358        case 'is_not_country_codes':
    356             $found=wpgc_csv_find($country_codes,$loc_arr['country_codes']);
     359            $found=wpgc_csv_find($country_codes,$loc_arr['country_code']);
    357360            if ($found==false) {
    358361                return $content;
     
    434437}
    435438
     439add_shortcode("wpgc_country_list", "wpgc_country_list");
    436440add_shortcode("wpgc_env", "wpgc_shortcode_env");
    437441add_shortcode("wpgc_database_date", "wpgc_shortcode_database_date");
     
    563567<li> [wpgc_is_city_and_state city="Yardley" state_code="PA"]
    564568<li> [wpgc_is_ip ip="xx.xx.xx.xx"]
     569<li> [wpgc_is_ips ip="xx.xx.xx.xx"]
    565570<li> [wpgc_is_ips ips="xx.xx.xx.xx,aa.bb.cc.dd"]
    566571<li> [wpgc_is_not_ip ip="xx.xx.xx.xx"]
     
    577582<li> [wpgc_is_not_country_name country_name=""]
    578583<li> [wpgc_is_not_country_code country_code=""]
     584<li> [wpgc_is_not_country_codes country_codes=""]
    579585<li> [wpgc_is_not_state_code state_code=""]
    580586</ul>
     
    969975    return false;
    970976} // end function wpgc_find_string_in_array
     977function 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    );
     1174return implode("<BR>",$country_list);
     1175}
Note: See TracChangeset for help on using the changeset viewer.