內容簡介
本地 JSON 是在版本5中新增的一項功能,它可以將欄位組和欄位設置保存到主題內的檔案中。這個想法類似於緩存,可以極大地加快ACF並允許您在欄位設置上進行版本控制!
然而,wp-admin欄位組編輯畫面將不會從本地json檔案加載數據,這意味著您無法編輯從json檔案加載的欄位。這個外掛程式解決了這個問題,創建了一個簡單的方法將json欄位同步到數據庫中。這樣可以在多個環境和貢獻者之間共享欄位,而無需導出/導入數據庫。
這個外掛程式很多功能與「進階自訂欄位出口設置」中發現的功能相同(advanced-custom-fields-pro/admin/settings-export.php)。
注意事項
本地Json資料夾的檔名必須是默認的acf-json。
下載json欄位時將覆蓋存儲在數據庫中的所有欄位。請小心使用!
外掛標籤
開發者團隊
原文外掛簡介
Local JSON is a new feature added in version 5 which saves field group and field settings to files within your theme. The idea is similar to caching and both dramatically speeds up ACF and allows for version control over your field settings!
HOWEVER, the wp-admin field group edit screen will not load data from local json files, meaning you can not edit fields which are loaded from json files. This plugin solves this problem by creating an easy way to sync json fields into the database. This allows fields to be shared across multiple environments and contributors without having to export/import the database.
This plugin copies much of the functionality found in the Advanced Custom Fields export settings (advanced-custom-fields-pro/admin/settings-export.php).
Notes
Local Json folder filename must be the default acf-json.
Syncing down json fields will overwrite all fields stored in the database. Use with caution!
