[wp-trac] [WordPress Trac] #37514: Shiny Updates: Remove console.error() calls
WordPress Trac
noreply at wordpress.org
Mon Aug 1 16:34:23 UTC 2016
#37514: Shiny Updates: Remove console.error() calls
-----------------------------+-----------------------------------------
Reporter: ocean90 | Owner:
Type: defect (bug) | Status: new
Priority: normal | Milestone: 4.6
Component: Upgrade/Install | Version: trunk
Severity: normal | Resolution:
Keywords: has-patch | Focuses: javascript, administration
-----------------------------+-----------------------------------------
Comment (by swissspidy):
Yeah, `window.console.warning` could work too, but then we should remove
the `return;` statements.
Let's say we're going to add bulk actions to `wp-admin/update-core.php` in
Shiny Updates V3 and want to re-use some of the existing code in core.
With errors and and `return;` statements everywhere that's not easily
possible without completely overriding the JS (which is hard to maintain).
See [37971] for the change I mentioned. A simple if block would look
cleaner than a few empty `case` blocks.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/37514#comment:9>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list