WordPress.org

Plugin Directory

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.

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).

  • multiple: enables multiple select.

  • selected: adds the selected attribute.

Requires: 3.6 or higher
Compatible up to: 3.8.8
Last Updated: 2013-12-28
Active Installs: 60+

Ratings

0 out of 5 stars

Support

Got something to say? Need help?

Compatibility

+
=
Not enough data

0 people say it works.
0 people say it's broken.