
內容簡介
Menu Helper可以有兩種使用方式:作為簡碼(如A節中所述),或者更高級的程式化使用方式,作為返回數組的函數(如B節所述)。對於兩種使用方式,選項是相同的。在插件啟動後,您可以在「設置-〉菜單助手信息」中找到詳細說明和示例。
submenu_slug - 允許定義子菜單元素的自定義ID
parent_id - 如果不為空,將提供parent_id選項的子級。如果設置為0,將獲取1級項目(及其子級,如果submenu_depth設置為大於1的數字)
menu_id-如果是整數,將使用菜單ID,否則將是菜單的slug/name。如果未定義,插件將檢查是否在任何菜單定義中使用了parent_id,並選擇找到的第一個
include_parent - 如果設置為true,將包括父元素
container_tag-允許設置容器的標籤元素
container_class - 允許為容器元素定義自定義CSS類。可以包含多個以空格分隔的類名
item_tag-允許為菜單項目設置標籤元素
item_class-允許為每個子菜單項目定義自定義CSS類
first_item_class-允許為子菜單中的第一個項目定義自定義CSS類。如果submenu_depth設置為大於1的值,該類將在每個級別上重復出現
strict_first_item_class - 允許僅為子菜單中的第一個項目定義自定義CSS類
last_item_class-允許為子菜單中的最後一個項目定義自定義CSS類。如果submenu_depth設置為大於1的數字,該類將在每個級別上重復出現
submenu_depth-如果設置為大於1的數字,將顯示所呼叫的子級。要獲得完整的子級深度,請將此參數設置為-1
theme_location-插件將使用與theme_location值關聯的菜單
對於舊版WordPress或任何問題,您可以發送電子郵件至[email protected]與我聯繫
外掛標籤
開發者團隊
原文外掛簡介
Menu Helper can be used in 2 forms: as short code ( as described in section A) or, for more advanced programmatic use, as function which returns an array (as described in section B). For both usage styles the options are the same. You will find a detailed description with examples in Settings -> Menu Helper Info after the plugin’s activation.
submenu_slug – Allows to define a custom id for the submenu element
parent_id – If not null, will provide the children of the parent_id option. If set to 0 will get level 1 items (and their children, if submenu_depth set to a number greater than 1)
menu_id – If integer, will be used the menu ID, otherwise will be the menu’s slug/name. If not defined the plugin will check if the parent_id is used in any menu definition and pick the first it finds
include_parent – If set to true will include the parent element
container_tag – Allows to set the tag element of the containers
container_class – Allows to define a custom CSS class for container element. Can contain more class names separated by space
item_tag – Allows to set the tag element for menu items
item_class – Allows to define a custom CSS class for each submenu item
first_item_class – Allows to define a custom CSS class for first item in submenu. If submenu_depth is set to greater than 1 the class will repeat on each level
strict_first_item_class – Allows to define a custom CSS class only for the very first item in submenu
last_item_class – Allows to define a custom CSS class for last item in submenu. If submenu_depth is set to greater than 1 the class will repeat on each level
submenu_depth – If set to a number greater than 1 the call will show in depth children. To get full submenu depth set this parameter to -1
theme_location – The plugin will use the menu associated to the value of the theme_location
For older WordPress versions or any issue you can email me at [email protected]
