log1x / acf-phone-number
A real ACF phone number field.
Fund package maintenance!
Log1x
Installs: 49 978
Dependents: 0
Suggesters: 0
Security: 0
Stars: 115
Watchers: 11
Forks: 18
Open Issues: 3
Type:wordpress-plugin
Requires
- php: >=7.2
- giggsey/libphonenumber-for-php: ^8.12
Requires (Dev)
- dev-master
- v1.3.1
- v1.3.0
- v1.2.6
- v1.2.5
- v1.2.4
- v1.2.3
- v1.2.2
- v1.2.1
- v1.2.0
- v1.1.9
- v1.1.8
- v1.1.7
- v1.1.6
- v1.1.5
- v1.1.4
- v1.1.3
- v1.1.2
- v1.1.1
- v1.1.0
- v1.0.8
- v1.0.7
- v1.0.6
- v1.0.5
- v1.0.4
- v1.0.3
- v1.0.2
- v1.0.1
- v1.0.0
- dev-fix/90
- dev-dependabot/npm_and_yarn/follow-redirects-1.15.4
- dev-dependabot/npm_and_yarn/browserify-sign-4.2.2
This package is auto-updated.
Last update: 2024-11-05 04:22:42 UTC
README
A real ACF phone number field powered by libphonenumber and intl-tel-input
Requirements
Installation
Bedrock
Install via Composer:
$ composer require log1x/acf-phone-number
Manual
Download the release .zip
and install into wp-content/plugins
.
Usage
Pretty straight forward usage. You can optionally set a default country.
Calling the field will return an arrayable object containing everything you need about your number:
^ array:10 [ "carrier" => "" "country" => "United States" "e164" => "+14058675309" "international" => "+1 405-867-5309" "location" => "Oklahoma" "national" => "(405) 867-5309" "rfc3966" => "tel:+1-405-867-5309" "timezone" => array:1 [ 0 => "America/Chicago" ] "uri" => "tel:+14058675309" ]
ACF Composer
If you are on Sage 10 and using my ACF Composer package:
$field ->addField('my_number_field', 'phone_number') ->setConfig('placeholder', '+1 555-555-5555') ->setConfig('default_country', 'us');
Bug Reports
If you discover a bug in ACF Phone Number, please open an issue.
Contributing
Contributing whether it be through PRs, reporting an issue, or suggesting an idea is encouraged and appreciated.
License
ACF Phone Number is provided under the MIT License.