Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/speccode/acf-price
Advanced Custom Fields: Price
https://github.com/speccode/acf-price
acf acf-field advanced-custom-fields price wordpress
Last synced: 27 days ago
JSON representation
Advanced Custom Fields: Price
- Host: GitHub
- URL: https://github.com/speccode/acf-price
- Owner: speccode
- License: mit
- Created: 2015-01-31T23:12:30.000Z (almost 10 years ago)
- Default Branch: master
- Last Pushed: 2022-03-01T11:34:49.000Z (almost 3 years ago)
- Last Synced: 2024-11-01T11:31:30.587Z (about 1 month ago)
- Topics: acf, acf-field, advanced-custom-fields, price, wordpress
- Language: PHP
- Homepage:
- Size: 23.4 KB
- Stars: 29
- Watchers: 2
- Forks: 8
- Open Issues: 6
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
- awesome-acf - Price - Price Field. (Third-Party Add-Ons)
README
# ACF Price Field
ACF Price field with number formatting.
-----------------------
### Description
**How it works**
* Plugin will store your "price" as float so any time you will change desire number format there will be no reformatting problems.
* Best column type in database for "price" related fields is decimal. As WordPress keep meta as type "text" I can only cast it to float. Keep it in mind.
* Field validation is "live" thanks to https://github.com/teamdf/jquery-number.
* When you use `get_field` function you will get preformatted number based on your settings.**Options**
`format`
Available formats:
* `1 337.55`
* `1 337,55`
* `1,337.55`
* `1.337,55`
* `1337`
* `1 337`**Default parameters result**
`1 337.00`
### Compatibility
This ACF field type is compatible with:
* ACF 5
* ACF 4### Installation
1. Copy the `acf-price` folder into your `wp-content/plugins` folder
2. Activate the Price plugin via the plugins admin page
3. Create a new field via ACF and select the Price type
4. Please refer to the description for more info regarding the field type settings### CHANGELOG
Please see readme.txt for changelog