內容簡介
這個外掛是一個 Pods 遷移插件,可遷移儲存在主題或外掛中的 pods.json。
我已在 Config.php 中添加了新功能,這個功能正在開發中。
https://github.com/pods-framework/pods/pull/4856
該插件的功能如下:
自動發現主題中的 pods.json 和通過pods_config_pre_load_configs添加的json
通過將 JSON 轉換為數組來準備數組。
將數組進行MD5,比較以前遷移的已保存MD5字符串,以確定是否需要進行遷移。如果MD5相同,則略過pod。
調用 PodsAPI 的 add_pod 以保存 pod
保存新的MD5,以在下次遷移時進行參考。
我只測試過具有字段和組的 pods,並且對於添加和更新依然可以工作。
注意:如果未安裝並啟用 WordPress Pods,該插件無法正常運作https://wordpress.org/plugins/pods/
外掛標籤
開發者團隊
原文外掛簡介
This pods migration plugin to perform pods migration that are saved as pods.json on themes or plugins.
I have added new functions to Config.php that has been in development.
https://github.com/pods-framework/pods/pull/4856
The plugin functionality work’s as follows;
Autodiscover pods.json in themes and those add via pods_config_pre_load_configs.
prepare an array by converting JSON to an array.
MD5 the array and compare previously saved MD5 string for previous migrations so as to determine if migration is required.If MD5 is the same the pod is ignored.
Call add_pod at PodsAPI to save the pod
Save new MD5 from the array for reference during the next migration.
I have only tested with pods with fields and groups only and it is working both for adding, and updating.
NOTE: The plugin can not work if wordpress pods is not installed and activated https://wordpress.org/plugins/pods/
