ACF-Local-JSON
ACF-Local-JSON copied to clipboard
Load and save json folder //
Json folder (save)
save_json
/site/app/public/wp-content/plugins/ACF-Local-JSON-master//acf-json
Json folder (load)
load_json
/site/app/public/wp-content/plugins/ACF-Local-JSON-master//acf-json
Looks a bit odd with // is the plugin still compatible with latest ACF PRO version?
@wplit using https://wordpress.org/plugins/acf-extended/ PHP sync loads form theme as well could we change the path to a non theme folder to support Oxygen builder? Or is it not needed?
Auto Sync PHP Automatically synchronize field groups with local PHP files upon field group updates. This feature will create, include and update a local PHP file for each field group (just like the native Json sync feature). Default folder: /wp-content/themes/my-theme/acfe-php/
Auto Sync Json Control which field groups you want to synchronize with local Json files. Display warnings if the Json file has been manually deleted. Manually synchronize Json from field group screen.
php sync should be the fastest option and with acf extended if everything is setup I can pick how to sync. But php path is by default in theme folder meaning we need a solution for php sync for oxygen. Shared the lines below which needs some minor cusotmization to load in the desired folder and file.
Do you mind adding this in the plugin? Easier to have everything in one place, and maybe there is a bug in the json path as shared above?
- No Sync (alias: DB sync) Field groups & fields are saved and loaded from MySQL DB. It has great impact on performance as ACF will constantly use DB to retrieve fields configurations informations.
- Json Sync Fields groups & fields are saved in DB and Json file. They are loaded from Json. This method gives a significant boost as fields configurations are loaded using the server hard drive (which is very fast, even more fast if the hard drive is an SSD)
- PHP Sync Fields groups & fields are saved in DB and PHP file. They are loaded directly from PHP memory. This is the best performance method. Speed is slightly better than Json, but Json is still a very valid method for production websites.
ACF settings (https://www.advancedcustomfields.com/resources/acf-settings/) you can change the ACF Extended PHP path settings to set a custom path (outside of theme for example). Here are the two settings you should change if using acf extended.
add_action('acf/init', 'my_acfe_php_settings');
function my_acfe_php_settings(){
// ACF Extended: PHP Save Sync Path
acf_update_setting('acfe/php_save', '/home/website.com/public_html/wp-content/acfe-php');
// ACF Extended: PHP Load Sync Path (must be an array)
acf_update_setting('acfe/php_load', array('/home/website.com/public_html/wp-content/acfe-php'));
}
Guess this plugin is no longer maintained?