Download the PHP package pxlrbt/acf-configurator without Composer
On this page you can find all versions of the php package pxlrbt/acf-configurator. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download pxlrbt/acf-configurator
More information about pxlrbt/acf-configurator
Files in pxlrbt/acf-configurator
Package acf-configurator
Short Description Wrapper for easy local ACF configuration in php.
License GPL-3.0-or-later
Informations about the package acf-configurator
ACF Configurator
A wrapper for easy local Advanced Custom Fields configuration in php.
ACF Configurator comes into play when you want to define Advanced Custom Fields groups in PHP and not via database. Since ACFs standard way of configuration is a long multidimensional array, it gets confusing very fast. ACF Configurator provides an easy, intuive way to configure ACF groups and fields. It uses a short, OOP oriented syntax for configuration.
Why not use the Advanced Custom Fields GUI?
The Advanced Custom Fields plugin provides a nice interface which is convenient for managing groups and fields in WordPress. Even clients can easily edit field with little knowledge. But configuration via PHP has some advantages:
- No loading from database. Configuration is not stored in database anymore and does not need to be fetched every time the page loads.
- Couple code and configuration. Configuration does not belong into a database. Custom fields and the themes codebase are usually coupled together tightly. Changing fields without updating the code will probalby break things.
- Easier migration. If a theme needs an update you usually test it in an development environment first. Transferring all the changes you made to your live site before deploying your new code, can break things, or at least is really annoying.
Installation
Install this package via Composer:
Usage (Example)
Just import ACF Configurator and start configuration. Group class takes care of registration.
Alternatives
This plugin doesn't fit your needs? Here are some alternatives:
Contributing
Contribution to this project is appreciated. Feel free to add non-standard field types or suggest improvements.