Closed slobich closed 7 months ago
I don't recall what those properties look like but that should be fine. Feel free to open a PR.
They get added with wp_setup_nav_menu_item()
function. They both have info about the actual item the menu item is linking to. For example if the link is for a page the type
property will be post_type
and the object
property will be page
.
I'll go ahead with creating a PR and get back to you then.
Thank you.
Hey. Great library.
Any chance of adding
type
andobject
properties to the list of attributes so they get passed down from the original menuWP_Post
object?I'm working on a project where I need to change the the URL and appearance of links based on their target. I can do most of it by checking the
classes
property but some of the classes are being removed here so it doesn't cover all of the scenarios. For example if the target is a page theclasses
property is empty since they get removed since those classes are in the$disallowedClasses
property.I can do a PR but I just wanted to check if this request makes sense to you.
Thnx.