[wp-trac] [WordPress Trac] #31964: Use a replaceable function for the beforeupload handler with shiny updates
WordPress Trac
noreply at wordpress.org
Wed Apr 15 14:21:05 UTC 2015
#31964: Use a replaceable function for the beforeupload handler with shiny updates
-----------------------------+---------------------------------------------
Reporter: DavidAnderson | Owner: jorbin
Type: enhancement | Status: reopened
Priority: low | Milestone: 4.2
Component: Upgrade/Install | Version: trunk
Severity: normal | Resolution:
Keywords: has-patch | Focuses: ui, javascript, administration
shiny-updates |
-----------------------------+---------------------------------------------
Comment (by jorbin):
You need to enqueues a script that has updates.js as a dependency and not
just place your js directly in the footer.
I created a sample plugin that demonstrates this
https://gist.github.com/aaronjorbin/5644934946c05ad08b9c
Wrapping the call to wp.updates.beforeunload in anonymous function defeats
the purpose of using a named function that can be removed. What browser
are you seeing an issue with it in?
--
Ticket URL: <https://core.trac.wordpress.org/ticket/31964#comment:12>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list