You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
. To me it looks like those filters are duplicates, since they will eventually be applied when wp_insert_post calls sanitize_post. The wp_update_nav_menu_item function does takes care of moving menu-item-title and friends into their correct variable names for wp_insert_post. Of note, we don't apply these filters in the base WP_REST_Posts_Controller class.
There may be other instances, but I didn't find any in a cursory glance. It'd be good to have another set of eyes or two to look over the code path as well.
The text was updated successfully, but these errors were encountered:
We need to make sure that menus and menu items are having the correct filters applied when being saved.
Something that stood out to me was the
_save_pre
filters inprepare_item_for_database
,gutenberg/lib/class-wp-rest-menu-items-controller.php
Line 516 in 458277c
wp_insert_post
callssanitize_post
. Thewp_update_nav_menu_item
function does takes care of movingmenu-item-title
and friends into their correct variable names forwp_insert_post
. Of note, we don't apply these filters in the baseWP_REST_Posts_Controller
class.There may be other instances, but I didn't find any in a cursory glance. It'd be good to have another set of eyes or two to look over the code path as well.
The text was updated successfully, but these errors were encountered: