Class that represent a menu item. You usually don't have to create this by yourself, but
by calling functions like WPS::menu('primary')
.
$menuItem = new \WPS\Menu_Item($wp_post);
Author : Olivier Bossel olivier.bossel@gmail.com https://olivierbossel.com
Construct the object using the wp_post passed menu item
Name | Type | Description | Status | Default |
---|---|---|---|---|
$wp_post | { WP_Post } | The wp_post menu item | required |
$wpsMenuItem = new \WPS\Menu_Item($wp_post);
Author : Olivier Bossel olivier.bossel@gmail.com https://olivierbossel.com
Public
The menu item id
Type : { Integer }
Public
Default : null
THe menu item url
Type : { String }
Public
Default : null
The menu item title
Type : { String }
Public
Default : null
The menu item title attribute
Type : { String }
Public
Default : null
The menu item target
Type : { String }
Public
Default : null
The menu item description
Type : { String }
Public
Default : null
The meni item classes
Type : { Array }
Public
Default : []
The menu item sub items
Type : { Array }
Public
Default : []