juslintek / acf-country

ACF Country field - Display a select field of all countries, in any language.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

ACF Country field

GitHub issues Packagist

Adds a 'Country' field type for the Advanced Custom Fields WordPress plugin.

Overview

Display a select list of all countries in your language.

Country names are available in every language (see available list). By default, country names are localized in your current WordPress language.

Select a single value:

ACF Country field

Or multiple ones:

ACF Country field

Compatibility

This add-on will work with:

  • ACF version 4
  • ACF version 5 (pro)
  • PHP 5.3 or higher

Field options

  • Allow null: enable/disable null value (disabled by default)
  • Allow multiple: enable/disable multiple countries selection (disabled by default)
  • Stylised UI: enable/disable enhanced select field thanks to Select2 (enabled by default)
  • Return format:
    • country code and country name (default):
      • single: array('FR' => 'France')
      • multiple: array('FR' => 'France', 'DE' => 'Germany')
    • country code:
      • single: FR
      • multiple: array('FR', 'DE', 'ES')
    • country name:
      • single: France
      • multiple: array('France', 'Germany', 'Spain')

Installation

Zip

Download the plugin and extract the archive to your plugins folder.

Composer

composer require hellonico/acf-country

About

ACF Country field - Display a select field of all countries, in any language.


Languages

Language:PHP 67.6%Language:JavaScript 31.7%Language:CSS 0.7%