[wp-trac] [WordPress Trac] #36590: POST['nav-menu-data'] breaks other POST values

WordPress Trac noreply at wordpress.org
Wed Apr 20 21:05:58 UTC 2016


#36590: POST['nav-menu-data'] breaks other POST values
-------------------------------------+-------------------------------------
 Reporter:  Unyson                   |       Owner:
     Type:  defect (bug)             |      Status:  new
 Priority:  normal                   |   Milestone:  4.5.1
Component:  Menus                    |     Version:  4.5
 Severity:  normal                   |  Resolution:
 Keywords:  needs-patch needs-       |     Focuses:  javascript,
  testing                            |  administration
-------------------------------------+-------------------------------------

Comment (by ericlewis):

 In attachment:36590.diff, I've moved the variable expansion code into a
 separate function `wp_expand_nav_menu_post_data()`, and modified it to
 support multidimensional nesting. Feedback welcome on this implementation.

 I've also added some tests. One still fails, as it seems
 `array_merge_recursive()` doesn't merge values under the same numeric
 index, and instead moves the value of one numeric index into the next
 numeric index (see the test output).

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


More information about the wp-trac mailing list