[wp-trac] [WordPress Trac] #55051: WP_Customize_Nav_Menu_Item_Setting class needs hooks/filters parity for preview and update
WordPress Trac
noreply at wordpress.org
Thu Feb 3 14:24:01 UTC 2022
#55051: WP_Customize_Nav_Menu_Item_Setting class needs hooks/filters parity for
preview and update
----------------------------+---------------------
Reporter: helgatheviking | Owner: (none)
Type: defect (bug) | Status: new
Priority: normal | Milestone: 6.0
Component: Customize | Version:
Severity: normal | Resolution:
Keywords: needs-patch | Focuses:
----------------------------+---------------------
Comment (by helgatheviking):
I spent all day trying to make sense of it yesterday and while I didn't
make much sense of anything :) I noticed the same thing... the hooks are
inconsistent across the extended classes.
I also was trying to figure out how the input data flows and I think it
goes from `sanitize` to `update`... but I find the sanitize filter pretty
difficult to work with. How would one know what each nav menu item's ID is
going to be in order to filter
[`"customize_sanitize_{$this->id}"`](https://github.com/helgatheviking
/Nav-Menu-Roles/tree/issues/56-exclude-by-role)? And how does one get the
current data there as `$menu_item_value` is the sanitized result.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/55051#comment:2>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list