WP Country

Provides WP_Country PHP class to get countries list as an array and dropdown country select for use in other plugins and themes.

By andreyk

Version 0.2 Active Installs 100+ Updated 10 years ago 12 years old

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.

Plugin comparisons

See how this plugin stacks up against alternatives side by side.