Title: WP Country
Author: andreyk
Published: <strong>دسمبر 28, 2013</strong>
Last modified: اپریل 16, 2016

---

Search plugins

This plugin **hasn’t been tested with the latest 3 major releases of WordPress**.
It may no longer be maintained or supported and may have compatibility issues when
used with more recent versions of WordPress.

![](https://s.w.org/plugins/geopattern-icon/wp-country.svg)

# WP Country

 By [andreyk](https://profiles.wordpress.org/andreyk/)

[Download](https://downloads.wordpress.org/plugin/wp-country.zip)

 * [Details](https://bcc.wordpress.org/plugins/wp-country/#description)
 * [Reviews](https://bcc.wordpress.org/plugins/wp-country/#reviews)
 *  [Installation](https://bcc.wordpress.org/plugins/wp-country/#installation)
 * [Development](https://bcc.wordpress.org/plugins/wp-country/#developers)

 [Support](https://wordpress.org/support/plugin/wp-country/)

## Description

To use the WP Country plugin in your theme or plugin add `global $wp_country;` into
your theme or plugin PHP file,
 then:

 * `$wp_country->countries_list()` is an array of country names
 * `$wp_country->dropdown()` prints or returns countries as dropdown HTML tag.
 * `$wp_country->name($alpha2)` returns the name of a country by it’s 2-character
   code.

Russian translation is available now.

## Installation

 1. Upload the `wp-country` folder to the `/wp-content/plugins/` directory.
 2. Activate the plugin.

## FAQ

Advanced usage: `dropdown($blank, $echo, $args)`

  Parameters Description

 * _blank_: if not empty then `<option value=''>` will be added into dropdown list.
   Default: ”.
 * _echo_: prints the list if true else returns. Default: true.
 * _args_: an array of extra parameters. Default: `array('include' => array(), '
   exclude' => array(), 'name' => 'country', 'id' => '', 'selected' => array(), '
   multiple' => false)`.

  Description of `args` components

 * _include_, _exclude_: an array of country codes (alpha2) should be included into
   dropdown list or excluded from it.
 * _name_: `name` attribute of the SELECT tag.
 * _id_: `id` attribute (not displayed by default).
 * _class_: `class` attribute of the SELECT tag (empty by default).
 * _multiple_: enables multiple select.
 * _selected_: adds the `selected` attribute.

## Reviews

There are no reviews for this plugin.

## Contributors & Developers

“WP Country” is open source software. The following people have contributed to this
plugin.

Contributors

 *   [ andreyk ](https://profiles.wordpress.org/andreyk/)

[Translate “WP Country” into your language.](https://translate.wordpress.org/projects/wp-plugins/wp-country)

### Interested in development?

[Browse the code](https://plugins.trac.wordpress.org/browser/wp-country/), check
out the [SVN repository](https://plugins.svn.wordpress.org/wp-country/), or subscribe
to the [development log](https://plugins.trac.wordpress.org/log/wp-country/) by 
[RSS](https://plugins.trac.wordpress.org/log/wp-country/?limit=100&mode=stop_on_copy&format=rss).

## Changelog

 * 0.2 Add `class` parameter for dropdown list.
 * 0.1 Initial version.

## Meta

 *  Version **0.2**
 *  Last updated **10 years ago**
 *  Active installations **90+**
 *  WordPress version ** 3.6 or higher **
 *  Tested up to **4.5.33**
 *  Language
 * [English (US)](https://wordpress.org/plugins/wp-country/)
 * Tags
 * [countries list](https://bcc.wordpress.org/plugins/tags/countries-list/)[country](https://bcc.wordpress.org/plugins/tags/country/)
   [dropdown](https://bcc.wordpress.org/plugins/tags/dropdown/)[select](https://bcc.wordpress.org/plugins/tags/select/)
 *  [Advanced View](https://bcc.wordpress.org/plugins/wp-country/advanced/)

## Ratings

No reviews have been submitted yet.

[Your review](https://wordpress.org/support/plugin/wp-country/reviews/#new-post)

[See all reviews](https://wordpress.org/support/plugin/wp-country/reviews/)

## Contributors

 *   [ andreyk ](https://profiles.wordpress.org/andreyk/)

## Support

Got something to say? Need help?

 [View support forum](https://wordpress.org/support/plugin/wp-country/)