[wp-trac] [WordPress Trac] #47056: Add 'wp_nav_menu_item_custom_fields' hook in Walker_Nav_Menu_Edit::start_el()
WordPress Trac
noreply at wordpress.org
Wed Aug 5 19:52:40 UTC 2020
#47056: Add 'wp_nav_menu_item_custom_fields' hook in
Walker_Nav_Menu_Edit::start_el()
------------------------------------+-----------------------
Reporter: MikeSchinkel | Owner: audrasjb
Type: enhancement | Status: closed
Priority: normal | Milestone: 5.4
Component: Menus | Version: 5.2
Severity: normal | Resolution: fixed
Keywords: has-patch has-dev-note | Focuses:
------------------------------------+-----------------------
Comment (by helgatheviking):
Hey y'all.... the dev notes on
`wp_nav_menu_item_custom_fields_customize_template` could use some more
detail as currently there's no docu on how to make that hook
''functional''.
I've figured out how to display the extra fields, but without at least a
point in the right direction it's unclear how to get the data for the menu
item to the output. The other fields are using `{{ data.something }}` but
I can't find out to insert properties to the `data` object as there's no
filter for the `WP_Customize_Nav_Menu_Item_Control::json()` function (or
it's parent).
It's also unclear how to send the data back to the DB... I expect
something in the `wp.customizer` scripts, but can't yet find where.
I'm willing to write a tutorial on this, but going to need a point in the
right direction.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/47056#comment:28>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list