[WordPress] 外掛分享: Nav Menu Roles

WordPress 外掛 Nav Menu Roles 的封面圖片。

前言介紹

  • 這款 WordPress 外掛「Nav Menu Roles」是 2012-09-19 上架。
  • 目前有 80000 個安裝啟用數。
  • 上一次更新是 2024-07-26,距離現在已有 281 天。
  • 外掛最低要求 WordPress 4.5.0 以上版本才可以安裝。
  • 外掛要求網站主機運作至少需要 PHP 版本 5.3.2 以上。
  • 有 216 人給過評分。
  • 還沒有人在論壇上發問,可能目前使用數不多,還沒有什麼大問題。

外掛協作開發者

helgatheviking |

外掛標籤

menu | menus | nav menu | nav menus |

內容簡介

這個外掛可以根據使用者角色隱藏自訂選單項目。例如,如果您只想把選單中某個連結顯示給已登入的使用者、特定類型的使用者,或者甚至只顯示給未登入的使用者,這個外掛就非常適合您。

Nav Menu Roles 非常靈活。除了標準的使用者角色以外,您可以透過新增帶有自訂標籤的核取方塊 (check boxes) 使用 `nav_menu_roles` filter 自訂功能,然後使用 `nav_menu_roles_item_visibility` filter 檢查您需要的任何條件。這可以檢查任何使用者的 meta 值(例如能力)以及其他外掛新增的任何自訂屬性。

重要提示

在 WordPress 中,選單項目和頁面是完全獨立的實體。Nav Menu Roles 不會限制存取內容。Nav Menu Roles 只用於顯示/隱藏導覽選單項目。如果您想要限制內容,您需要使用會員資格外掛。

使用方式

前往外觀 > 選單
將「顯示模式」設定為「已登入的使用者」、「登出使用者」或「所有人」。預設為「所有人」。
如果您想要按角色自訂,將「顯示模式」設定為「已登入的使用者」,然後在「將選單項目限制為最少的角色」下勾選要求的角色旁邊的方塊。請記住,這個角色並不嚴格限制項目僅允許這個角色使用,而是允許擁有此角色能力的所有人都可以使用項目。例如:設定為「訂閱者」的項目將由訂閱者和管理員訪問。請將其視為檢視項目所需的最小角色。

支援

支援服務在 WordPress 論壇中進行。請注意,支援服務有限,不包含任何自訂外掛實作。在發佈問題前,請閱讀 FAQ。同時,請驗證特定問題是否在停用其他外掛及使用預設主題時仍然存在。

如果發現任何錯誤、警告、程式碼問題,請向 Github 報告。

原文外掛簡介

This plugin lets you hide custom menu items based on user roles. So if you have a link in the menu that you only want to show to logged in users, certain types of users, or even only to logged out users, this plugin is for you.
Nav Menu Roles is very flexible. In addition to standard user roles, you can customize the functionality by adding your own check boxes with custom labels using the nav_menu_roles filter and then using the nav_menu_roles_item_visibility filter to check against whatever criteria you need. You can check against any user meta values (like capabilities) and any custom attributes added by other plugins.
IMPORTANT NOTE
In WordPress menu items and pages are completely separate entities. Nav Menu Roles does not restrict access to content. Nav Menu Roles is only for showing/hiding nav menu items. If you wish to restrict content then you need to also be using a membership plugin.
Usage

Go to Appearance > Menus
Set the “Display Mode” to either “logged in users”, “logged out users”, or “everyone”. “Everyone” is the default.
If you wish to customize by role, set the “Display Mode” to “Logged In Users” and under “Restrict menu item to a minimum role” check the boxes next to the desired roles. Keep in mind that the role doesn’t limit the item strictly to that role, but to everyone who has that role’s capability. For example: an item set to “Subscriber” will be visible by Subscribers and by admins. Think of this more as a minimum role required to see an item.

Support
Support is handled in the WordPress forums. Please note that support is limited and does not cover any custom implementation of the plugin. Before posting, please read the FAQ. Also, please verify the problem with other plugins disabled and while using a default theme.
Please report any bugs, errors, warnings, code problems to Github

各版本下載點

  • 方法一:點下方版本號的連結下載 ZIP 檔案後,登入網站後台左側選單「外掛」的「安裝外掛」,然後選擇上方的「上傳外掛」,把下載回去的 ZIP 外掛打包檔案上傳上去安裝與啟用。
  • 方法二:透過「安裝外掛」的畫面右方搜尋功能,搜尋外掛名稱「Nav Menu Roles」來進行安裝。

(建議使用方法二,確保安裝的版本符合當前運作的 WordPress 環境。


1.6.3 | 1.6.4 | 1.7.0 | 1.7.1 | 1.7.3 | 1.7.4 | 1.7.6 | 1.7.7 | 1.7.8 | 1.7.9 | 1.8.0 | 1.8.1 | 1.8.2 | 1.8.3 | 1.8.4 | 1.8.5 | 1.8.6 | 1.9.0 | 1.9.1 | 1.9.2 | 1.9.3 | 1.9.4 | 1.9.5 | 2.0.0 | 2.0.1 | 2.0.2 | 2.1.0 | 2.1.1 | 2.1.2 | 1.10.0 | 1.10.1 | 1.10.2 |

延伸相關外掛(你可能也想知道)

  • Privilege Menu 》這個外掛讓你能夠根據用戶的登入狀態、登出狀態或使用者所分配的角色來顯示選單項目。, 此外掛可允許在每個單一選單項目上新增細緻權限,以根據使用者的登入...。
  • Better Internal Link Search 》Better Internal Link Search 改進 WordPress 內建的內部連結搜尋功能,使您能更快且更輕鬆地找到要連結的內容。, 最基本的功能可限制搜尋結果僅顯示標題中包...。
  • Bop Search Box Item Type For Nav Menus 》此外掛功能為在管理員區域的導航菜單中,新增搜尋框作為選項之一。, 功能包括:, , 現在相容於 WordPress 風格客制化器,, 搜尋框可在管理區域中作為導航菜單...。
  • sTRASHo 》這個外掛可以讓你使用拖曳方式移除菜單項目,簡化刪除菜單的過程。如果你有很多菜單,刪除菜單可以非常耗時,這個外掛就能解決這個問題。sTRASHo 外掛位於「...。
  • Custom Post Type Archives in Nav Menus 》自 WordPress 4.4 版本開始,此外掛已加入 WordPress 核心。為支援存檔的自訂文章類型在導覽選單資料框中新增一個存檔核取方塊。。
  • Menu Tamer 》Menu Tamer在WordPress管理介面中的導覽選單項目上新增了展開/折疊連結。如果您有一個龐大的導覽選單,管理它可能會變成一項繁瑣的任務,因為它佔用的空間非...。

文章
Filter
Apply Filters
Mastodon