
內容簡介
這個外掛會透過移除多餘的 CSS 類別來保持網站導覽連結的 HTML 清潔,這些類別將被目標頁面的縮略名(例如 class="home")取代。
當前頁面的列表項目會被賦予額外的 “current-menu-item” 類別,以便突顯其位置。如果該頁面是子選單項目,則其父級項目也會被賦予額外的 “current-menu-parent” 類別,您可以在主題樣式中使用這些類別來進行突顯。
如果使用 AJAX 下載所選頁面,您的 JavaScript 代碼可以讀取“data-id”或“data-slug”屬性,從伺服器檢索該記錄。
設定
外掛啟用後,不需要進行任何額外的設定。
外掛標籤
開發者團隊
📦 歷史版本下載
原文外掛簡介
This plugin keeps the HTML of your navigation menu links clean by removing extraneous CSS classes from the each list item. Those classes are simply replaced by the target page’s slug (e.g. class=”home”).
The current page’s list item is given an additional “current-menu-item” so it can be highlighted. It that page is a submenu item, then its parent is is also given an additional “current-menu-parent” class you can use in your theme’s style to highlight it as well.
In case AJAX is used to download the selected page, your JavaScript code can read the “data-id” or “data-slug” attribute to fetch that record from the server.
Settings
Once the plugin is active, no additional settings needed.
