Plugin: Advanced Custom Fields (ACF)

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 it’s 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


Interesting related projects: awesomeacf.com For examplee, ooksanen/acf-focuspoint


Image Crop

Advanced Custom Fields: Image Aspect Ratio Crop Field Advanced Custom Fields: Image Crop Add-on

date 20. May 2021 | modified 05. Aug 2021
filename: Plugin » Advanced Custom Fields aka ACF