
內容簡介
這個外掛讓你能夠根據用戶的登入狀態、登出狀態或使用者所分配的角色來顯示選單項目。
此外掛可允許在每個單一選單項目上新增細緻權限,以根據使用者的登入狀態或所分配的角色決定是否要顯示該項目,解決了必須修改主題 functions.php 檔案以新增選單限制的問題。因為更改 functions.php 往往會在主題更新時被覆蓋而帶來困擾,這個外掛可避免這種情況,毋須擔心主題更新影響。
注意事項
此外掛使用的是 Nav Menu Walker 類別的修改版本。這表示其他使用自訂 Nav Menu Walker 類別的外掛可能會與此外掛發生衝突。WordPress 開發者已計劃在 v4.8 版本針對管理選單這個區域提供適當的自訂掛鉤,請參見 FAQ 項目「我在管理員面板的選單項目中找不到 Privilege Menu 的選項?」以獲得更多資訊。
外掛標籤
開發者團隊
原文外掛簡介
This plugin allows you to display menu items based on if a user is logged in, logged out or based on the role you have given the user.
This plugin allows fine-grained permissions to be added to each individual menu item to display or not display the item based on the
users logged in/logged out status or the role assigned to the user. This solves the problem of having to modify theme functions.php files to add in menu restrictions. The changes in functions.php is often overwritten by a theme update. This plugin removes that worry, as you can update the theme, independent of the plugin.
Please Note
This plugin uses a modified version of the Nav Menu Walker class. This means any other plugins that utilize their own custom Nav Menu Walker class, can and will conflict with this plugin. WordPress developers have support for proper custom hooks in this area of the Admin Menu slated for v4.8 release. Please see FAQ item “I cannot see the options for Privilege Menu under menu items in the Admin Panel?” for more information.
