{"id":15636609,"url":"https://github.com/nlemoine/acf-country","last_synced_at":"2025-04-05T14:07:10.933Z","repository":{"id":12929336,"uuid":"15607033","full_name":"nlemoine/acf-country","owner":"nlemoine","description":"ACF Country field - Display a select field of all countries, in any language.","archived":false,"fork":false,"pushed_at":"2024-03-15T16:15:36.000Z","size":3858,"stargazers_count":120,"open_issues_count":11,"forks_count":17,"subscribers_count":7,"default_branch":"3.x","last_synced_at":"2025-03-29T13:07:10.117Z","etag":null,"topics":["acf","acf-country-field","advanced-custom-fields","country","wordpress","wordpress-plugin"],"latest_commit_sha":null,"homepage":"","language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/nlemoine.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.md","funding":".github/FUNDING.yml","license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null},"funding":{"open_collective":"n5s"}},"created_at":"2014-01-03T10:28:58.000Z","updated_at":"2025-02-25T22:32:54.000Z","dependencies_parsed_at":"2024-10-22T14:55:37.950Z","dependency_job_id":null,"html_url":"https://github.com/nlemoine/acf-country","commit_stats":{"total_commits":79,"total_committers":5,"mean_commits":15.8,"dds":"0.12658227848101267","last_synced_commit":"458e9f567dee4d20095e6ae3df3e0d78288c889c"},"previous_names":[],"tags_count":14,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nlemoine%2Facf-country","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nlemoine%2Facf-country/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nlemoine%2Facf-country/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nlemoine%2Facf-country/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/nlemoine","download_url":"https://codeload.github.com/nlemoine/acf-country/tar.gz/refs/heads/3.x","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247345853,"owners_count":20924102,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["acf","acf-country-field","advanced-custom-fields","country","wordpress","wordpress-plugin"],"created_at":"2024-10-03T11:05:27.551Z","updated_at":"2025-04-05T14:07:10.909Z","avatar_url":"https://github.com/nlemoine.png","language":"PHP","funding_links":["https://opencollective.com/n5s","https://paypal.me/hellonico"],"categories":[],"sub_categories":[],"readme":"# ACF Country field\n\n[![Latest Version](https://img.shields.io/packagist/v/hellonico/acf-country.svg?style=flat-square)](https://github.com/nlemoine/acf-country/releases)\n[![Packagist](https://img.shields.io/packagist/dt/hellonico/acf-country.svg?style=flat-square)](https://packagist.org/packages/hellonico/acf-country)\n[![Beerpay](https://beerpay.io/nlemoine/acf-country/badge.svg?style=flat-square)](https://beerpay.io/nlemoine/acf-country)\n[![Donate](https://img.shields.io/badge/Donate-PayPal-blue.svg?style=flat-square)](https://paypal.me/hellonico)\n\nAdds a 'Country' field type for the [Advanced Custom Fields](http://wordpress.org/extend/plugins/advanced-custom-fields/) WordPress plugin.\n\n## ⚠️ WARNING ⚠️\n\n**From version 2.0.0, ACF Country introduced some important breaking changes**:\n\n- Dropped support for older PHP \u0026 ACF versions, new requirements are:\n\t- ACF 5.7+ \n\t- PHP 5.4+\n- Return format has changed. To better stick to ACF and make use of ACF functions, ACF Country will now return values the same way select field do. `['FR' =\u003e 'France']` will now look like `['label' =\u003e 'France', 'value' =\u003e 'FR']`\n\nLooking for a ACF pre 5.7 support? Check the [1.0 branch](https://github.com/nlemoine/acf-country/tree/1.0). \n\n### Overview\n\nDisplay a select list of all countries in your language.\n\nCountry names are available in every language ([see available list](https://github.com/umpirsky/country-list/tree/master/data)). By default, country names are localized in your current WordPress language.\n\nSelect a single value:\n\n![ACF Country field](https://cloud.githubusercontent.com/assets/2526939/24555414/5c045c7c-1631-11e7-815a-35b6b6903e36.png)\n\nOr multiple ones:\n\n![ACF Country field](https://cloud.githubusercontent.com/assets/2526939/24555413/5bf05402-1631-11e7-8d7e-74d425a3eae4.png)\n\n### Compatibility\n\n- ACF 5.7+ \n- PHP 5.4+\n\n\n### Field options\n\n| Option  | Default | Description |\n| ------------- | ------------- | ------------- |\n| Default value | emtpy | Set a default value for the country field (as country code)  |\n| Allow null | `false` | Enable/disable null value  |\n| Allow multiple | `false` | Enable/disable multiple countries selection  |\n| Stylised UI | `true` | Enable/disable enhanced select field thanks to [Select2](https://select2.github.io/)  |\n| Return format | `value` | See [ACF Select field](https://www.advancedcustomfields.com/resources/select/) |\n\n### Filters\n\nYou can remove (or add) some countries with the `acf/country/countries` filter, example:\n\n```php \nadd_filter( 'acf/country/countries', function( $countries ) {\n\treturn array_filter( $countries, function( $code ) {\n\t\treturn !in_array( $code, ['IC', 'EA'], true );\n\t}, ARRAY_FILTER_USE_KEY);\n} );\n```\n*Note: PHP5.6+ example*\n\n### Installation\n\n#### Zip\n\n[Download the plugin](https://github.com/nlemoine/acf-country/releases/latest) and extract the archive to your plugins folder.\n\n#### Composer\n\n```bash\ncomposer require hellonico/acf-country\n```\n\n### Contributing\n\nSee [CONTRIBUTING](CONTRIBUTING.MD).\n\n### Support\n\nThis ACF field was originally developed for a personal project I don't use  anymore. I still decided to maintain it anyway. If you use it in a commercial project, please consider [buying me a beer](https://beerpay.io/nlemoine/acf-country).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnlemoine%2Facf-country","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnlemoine%2Facf-country","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnlemoine%2Facf-country/lists"}