Plugin: Advanced Custom Fields (ACF)
Will not show up in the ACF admin
A field group as a JSON file or in PHP, will not show up in the ACF admin unless you import a JSON file.
If a JSON file exists in the themes
acf-json folder (default Local JSON location), that field group will be loaded without showing the field group in the ACF admin it the field group does not already exist there. You can set multiple load points. So you could have your plugin have its own folder for loading JSON files from. However, you can only have one save point, so when editing field groups in ACF the JSON files can be automatically saved, but only to one location.
Translation of labels cannot be done using JSON easily as using PHP.
The file format for “Local JSON” is not identical as the one you get through “Export JSON”. Second one is JSON Array but first one is just JSON. Also, the second has a “modified” field that helps him with synchronization and the first one does not. So always execute “Update” on Field Group and then download file from the folder where JSON is saved.
About multiple loading locations aka “load points” for
acf/settings/load_json: the order inside this path array is important as for same Field Groups, last one takes precedance.
Including ACF within a plugin
Real problem is how to include ACF Pro with Composer, because of Licence key.
ACF Pro as a Composer Dependency with Encrypted License Key | Roots GitHub - ffraenz/private-composer-installer: Composer install helper outsourcing sensitive keys from the package URL into environment variables older: GitHub - PhilippBaschke/acf-pro-installer: A composer install helper for Advanced Custom Fields PRO
Ustvari super plugin - ACF settings i razna druga - lako kopiranje. Bez baze. forumone/wp-cfm: Manage and deploy WordPress configuration changes
PhilippBaschke/acf-pro-installer: A composer install helper for Advanced Custom Fields PRO or similar: ffraenz/private-composer-installer: Composer install helper outsourcing sensitive keys from the package URL into environment variables
Very interesting extension to copy PHP code for ACF field:
ACF Color Picker and Gutenberg
Syncing your custom Block Editor Colour Palette with Advanced Custom Fields - Pixels & Things Synchronize Editor and ACF Color Pickers 🎨Synchronize Editor and ACF Synchronize and enhance WordPress color pickers - Noleam Synchronizing Your ACF Color Picker with Gutenberg Color Classes : Whiteley Designs
My problem with some ACF solutions
Updating via field key: The field’s key should be used when saving a new value to a post (when no value exists). This helps ACF create the correct ‘reference’ between the value and the field’s settings. source: update_field