[wp-trac] [WordPress Trac] #51592: Customizer: Create New Menu is Empty

WordPress Trac noreply at wordpress.org
Mon Oct 26 18:53:04 UTC 2020


#51592: Customizer: Create New Menu is Empty
--------------------------------------------------+---------------------
 Reporter:  boldgrid                              |       Owner:  (none)
     Type:  defect (bug)                          |      Status:  new
 Priority:  normal                                |   Milestone:  5.6
Component:  Customize                             |     Version:  trunk
 Severity:  blocker                               |  Resolution:
 Keywords:  has-patch dev-feedback needs-testing  |     Focuses:
--------------------------------------------------+---------------------

Comment (by westonruter):

 Replying to [comment:13 azaozz]:
 > The `nav_menu` and `add_menu` containers are already in the DOM, the
 other containers are not and `control.container.parent().is(
 parentContainer )` is still `false` for them.
 >
 > > I wonder, can't the `control.renderContent();` call be moved outside
 of the conditional leaving only the `.append` inside?
 >
 > Yes, testing this here seems to work. Pinging @westonruter for a review.

 This code introduced in r30102, with the work having been done in
 https://github.com/xwp/wordpress-develop/pull/29. The message for the
 [https://github.com/xwp/wordpress-
 develop/commit/97360b23eba74ae79b491aaed61216a425ebe044#diff-
 eb80327908a8ce12f22d9d8e9e1ce89a01cd6d07585ba982d89717ca5259a4aeR680 Git
 commit] was:

 > Allow controls and sections to be registered without parents
 >
 >  * Add ready() abstract to Section/Panel
 >  * Remove needless callbacks

 That being said, I don't recall why `control.renderContent()` was being
 made conditional upon `parentContainer` not being the
 `control.container.parent()`. Moving it outside of that conditional makes
 sense to me, and I'm not seeing any other regressions caused by doing so.

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


More information about the wp-trac mailing list