[wp-trac] [WordPress Trac] #15782: Consolidate header Javascript
WordPress Trac
wp-trac at lists.automattic.com
Thu Mar 24 08:48:43 UTC 2011
#15782: Consolidate header Javascript
-------------------------------------+-----------------------------
Reporter: dd32 | Owner:
Type: enhancement | Status: new
Priority: normal | Milestone: Future Release
Component: Administration | Version: 3.1
Severity: normal | Resolution:
Keywords: has-patch needs-testing |
-------------------------------------+-----------------------------
Comment (by azaozz):
At first look the patch seems right, it removes few duplicate lines of
HTML and replaces them with two PHP functions. However at closer look it
actually adds more code instead of reducing it.
It also seems to loose the `$hook_suffix` global which seems to be
redundant in the first place as only the `$admin_body_class` global is
needed in the script. Another weakness is that the patch allows defaults
to be overwritten. These JS globals should be consistent and exactly the
same as the PHP globals.
Perhaps a better approach is to just output the script as it is in the
admin head at the moment, without much PHP processing.
--
Ticket URL: <http://core.trac.wordpress.org/ticket/15782#comment:6>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software
More information about the wp-trac
mailing list