[wp-trac] [WordPress Trac] #29728: Could be very useful 'wp_remove_nav_menu_item'

WordPress Trac noreply at wordpress.org
Sat Jun 21 13:49:06 UTC 2025


#29728: Could be very useful 'wp_remove_nav_menu_item'
-------------------------------------------+-----------------------------
 Reporter:  JonathanBesomi                 |       Owner:  (none)
     Type:  feature request                |      Status:  new
 Priority:  normal                         |   Milestone:
Component:  Menus                          |     Version:  3.0
 Severity:  normal                         |  Resolution:
 Keywords:  has-patch needs-refresh close  |     Focuses:  administration
-------------------------------------------+-----------------------------
Changes (by SirLouen):

 * keywords:  has-patch needs-testing => has-patch needs-refresh close


Comment:

 Current patch not applying, in case anyone would like to refresh the
 solution provided by @tyxla (`needs-refresh`), although I would not
 recommend this for the following reasons:

 Over the top, as it was pointed out, a menu item is ultimately a post
 type, so basically it doesn't have anything special apart from a
 `wp_delete_post`.

 Checking the code, although I think that the patch provided is nice from a
 semantical perspective, it doesn't provide much value (probably a reason
 of why this never moved forward in a 10-year period).

 Long story short: This stunt is not necessary, for this reason, I would
 propose this, as `close` `wontfix`

-- 
Ticket URL: <https://core.trac.wordpress.org/ticket/29728#comment:7>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list