[wp-trac] [WordPress Trac] #34657: WordPress doesn't set object terms for menu items so pending items not working

WordPress Trac noreply at wordpress.org
Tue Oct 11 02:47:28 UTC 2016


#34657: WordPress doesn't set object terms for menu items so pending items not
working
-------------------------------------------------+-------------------------
 Reporter:  rss_samuel                           |       Owner:
     Type:  defect (bug)                         |      Status:  new
 Priority:  normal                               |   Milestone:  Awaiting
Component:  Menus                                |  Review
 Severity:  normal                               |     Version:  4.3.1
 Keywords:  dev-feedback has-patch reporter-     |  Resolution:
  feedback                                       |     Focuses:
                                                 |  administration
-------------------------------------------------+-------------------------
Changes (by welcher):

 * keywords:  needs-patch => dev-feedback has-patch reporter-feedback


Comment:

 I'm not sure we should be dying if `$_POST['menu']` is not set. That block
 is meant to check whether the user has the capability to do this and it
 shouldn't ( in my opinion ) care if that item is set.

 If we're just wanting to be sure that there is a value passed to the
 `wp_save_nav_menu_items` it might be a good idea to use a ternary instead.

 i.e  `$menu_id = ( isset( $_POST['menu'] ) ) ? absint( $_POST['menu'] ) :
 0;`

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


More information about the wp-trac mailing list