[wp-trac] [WordPress Trac] #32814: Custom Menu Widget should show newly added menus in Customizer
WordPress Trac
noreply at wordpress.org
Tue Jul 7 21:56:00 UTC 2015
#32814: Custom Menu Widget should show newly added menus in Customizer
------------------------------------+------------------------------
Reporter: adamsilverstein | Owner: adamsilverstein
Type: defect (bug) | Status: assigned
Priority: high | Milestone: 4.3
Component: Customize | Version: trunk
Severity: normal | Resolution:
Keywords: dev-feedback has-patch | Focuses: javascript
------------------------------------+------------------------------
Comment (by wonderboymusic):
[attachment:reboot.diff reboot.diff] makes this JS look more like the
other Customizer JS. I am not going to drop it in right now. I may have to
wait until all of the Customizer turbulence is over and then do one
cleanup.
A few notes:
* The `$.Deferred` is unnecessary - when resolved, it just calls init,
which adds another callback to the stack, which then gets called next. All
of these can be combined into one.
* `self` is a bad local variable name. Sometimes `self` is a substitute
for `this` when scope is lost in a maze of callbacks, but most of the
time, it just makes `this` more ambiguous than it already is.
* Almost all of these functions are static helper methods, do any of them
need to exposed publicly? We have gotten into a bad habit of globalizing
all of our JS, which has made BC a living hell when we want to use things
like `browserify`. I would expose as little as possible everywhere.
* We should distinguish between settings and class/instance properties.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/32814#comment:22>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list