內容簡介
解析‘需要外掛’標頭並在外掛安裝頁面中添加一個「相依項目」選項卡。如果一個需要外掛的外掛並沒有安裝和啟用所有相依項目,它將不能啟用。
Plugin Dependencies Feature Project 的相關文章
請在WordPress/wp-plugin-dependencies 常見問題集中回報問題。
我的解決方案#22316。特色外掛版本:PR #3032
解析具有 wp.org slug 的逗號分隔插件依賴的「需要外掛」標頭。要進行測試,您需要向插件添加標頭和內容。
向外掛安裝頁面(插件 > 「新增」)添加了一個名為「相依項目」的新檢視/選項卡,其中包含所有外掛相依的插件卡。
此檢視/選項卡還列出了哪些外掛需要哪些外掛相依的插件卡。 😅
在外掛頁面上,如果依賴的外掛是活動的,則無法刪除或停用相依的外掛。
如果需要的外掛未活動,則相依的插件可以停用或刪除。
插件行描述中插入了信息,取決於哪些插件需要依賴項目以及相關數據。
如果未安裝所有外掛相依項目,則顯示具有鏈接到插件 > 新增 > 「相依項目」的單個管理提示。
確保具有不滿足的依賴項目的插件無法啟用。
如果依賴 API 數據不可用,將在「相依項目」選項卡中顯示通用插件卡。
無法啟用具有循環依賴項目的插件。並顯示由循環依賴項目引起的管理提示。
確保具有不滿足的依賴項目的插件無法啟用。
有幾個單檔外掛可用於test-plugins/中進行測試。
Pull Requests
請提交 PR 到 develop 分支。
開發者團隊
📦 歷史版本下載
原文外掛簡介
Parses a ‘Requires Plugins’ header. If a requiring plugin does not have all its dependencies installed and active, it will not activate.
Make post for Plugin Dependencies Feature Project
Please open issues at WordPress/wp-plugin-dependencies issues
My solution to #22316. Feature plugin version of PR #3032
Parses the Requires Plugins header that defines plugin dependencies using a comma separated list of wp.org slugs. To test, you will need to add the header and content to a plugin.
In the plugins page, a dependent plugin is unable to be deleted or deactivated if the requiring plugin is active.
Plugin dependencies can be deactivated or deleted if the requiring plugin is not active.
Messaging in the plugin row description is inserted; as is data noting which plugins require the dependency.
Ensures that plugins with unmet dependencies cannot be activated.
Circular dependencies cannot be activated and an admin notice noting the circular dependencies is displayed.
Ensures that plugins with unmet dependencies cannot be activated.
There are several single file plugins that may be used for testing in test-plugins/.
Pull Requests
PRs should be made against the develop branch.
