<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head><meta http-equiv="content-type" content="text/html; charset=utf-8" />
<title>[18496] trunk/wp-includes: Optimize script-loader a bit, see #11520</title>
</head>
<body>

<style type="text/css"><!--
#msg dl.meta { border: 1px #006 solid; background: #369; padding: 6px; color: #fff; }
#msg dl.meta dt { float: left; width: 6em; font-weight: bold; }
#msg dt:after { content:':';}
#msg dl, #msg dt, #msg ul, #msg li, #header, #footer, #logmsg { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt;  }
#msg dl a { font-weight: bold}
#msg dl a:link    { color:#fc3; }
#msg dl a:active  { color:#ff0; }
#msg dl a:visited { color:#cc6; }
h3 { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt; font-weight: bold; }
#msg pre { overflow: auto; background: #ffc; border: 1px #fa0 solid; padding: 6px; }
#logmsg { background: #ffc; border: 1px #fa0 solid; padding: 1em 1em 0 1em; }
#logmsg p, #logmsg pre, #logmsg blockquote { margin: 0 0 1em 0; }
#logmsg p, #logmsg li, #logmsg dt, #logmsg dd { line-height: 14pt; }
#logmsg h1, #logmsg h2, #logmsg h3, #logmsg h4, #logmsg h5, #logmsg h6 { margin: .5em 0; }
#logmsg h1:first-child, #logmsg h2:first-child, #logmsg h3:first-child, #logmsg h4:first-child, #logmsg h5:first-child, #logmsg h6:first-child { margin-top: 0; }
#logmsg ul, #logmsg ol { padding: 0; list-style-position: inside; margin: 0 0 0 1em; }
#logmsg > ul, #logmsg > ol { margin-left: 0; margin: 0 0 1em 0; }
#logmsg pre { background: #eee; padding: 1em; }
#logmsg blockquote { border: 1px solid #fa0; border-left-width: 10px; padding: 1em 1em 0 1em; background: white;}
#logmsg dl { margin: 0; }
#logmsg dt { font-weight: bold; }
#logmsg dd { margin: 0; padding: 0 0 0.5em 0; }
#logmsg dd:before { content:'\00bb';}
#logmsg table { border-spacing: 0px; border-collapse: collapse; border-top: 4px solid #fa0; border-bottom: 1px solid #fa0; background: #fff; }
#logmsg table th { text-align: left; font-weight: normal; padding: 0.2em 0.5em; border-top: 1px dotted #fa0; }
#logmsg table td { text-align: right; border-top: 1px dotted #fa0; padding: 0.2em 0.5em; }
#logmsg table thead th { text-align: center; border-bottom: 1px solid #fa0; }
#logmsg table th.Corner { text-align: left; }
#logmsg hr { border: none 0; border-top: 2px dashed #fa0; height: 1px; }
#header, #footer { color: #fff; background: #636; border: 1px #300 solid; padding: 6px; }
#patch { width: 100%; }
#patch h4 {font-family: verdana,arial,helvetica,sans-serif;font-size:10pt;padding:8px;background:#369;color:#fff;margin:0;}
#patch .propset h4, #patch .binary h4 {margin:0;}
#patch pre {padding:0;line-height:1.2em;margin:0;}
#patch .diff {width:100%;background:#eee;padding: 0 0 10px 0;overflow:auto;}
#patch .propset .diff, #patch .binary .diff  {padding:10px 0;}
#patch span {display:block;padding:0 10px;}
#patch .modfile, #patch .addfile, #patch .delfile, #patch .propset, #patch .binary, #patch .copfile {border:1px solid #ccc;margin:10px 0;}
#patch ins {background:#dfd;text-decoration:none;display:block;padding:0 10px;}
#patch del {background:#fdd;text-decoration:none;display:block;padding:0 10px;}
#patch .lines, .info {color:#888;background:#fff;}
--></style>
<div id="msg">
<dl class="meta">
<dt>Revision</dt> <dd><a href="http://core.trac.wordpress.org/changeset/18496">18496</a></dd>
<dt>Author</dt> <dd>azaozz</dd>
<dt>Date</dt> <dd>2011-08-03 01:54:29 +0000 (Wed, 03 Aug 2011)</dd>
</dl>

<h3>Log Message</h3>
<pre>Optimize script-loader a bit, see <a href="http://core.trac.wordpress.org/ticket/11520">#11520</a></pre>

<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkwpincludesclasswpscriptsphp">trunk/wp-includes/class.wp-scripts.php</a></li>
<li><a href="#trunkwpincludesscriptloaderphp">trunk/wp-includes/script-loader.php</a></li>
</ul>

</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkwpincludesclasswpscriptsphp"></a>
<div class="modfile"><h4>Modified: trunk/wp-includes/class.wp-scripts.php (18495 => 18496)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/wp-includes/class.wp-scripts.php        2011-08-01 23:33:56 UTC (rev 18495)
+++ trunk/wp-includes/class.wp-scripts.php        2011-08-03 01:54:29 UTC (rev 18496)
</span><span class="lines">@@ -173,8 +173,12 @@
</span><span class="cx">         }
</span><span class="cx"> 
</span><span class="cx">         function set_group( $handle, $recursion, $group = false ) {
</span><del>-                $grp = (int) $this-&gt;get_data( $handle, 'group' );
</del><span class="cx"> 
</span><ins>+                if ( $this-&gt;registered[$handle]-&gt;args === 1 )
+                        $grp = 1;
+                else
+                        $grp = (int) $this-&gt;get_data( $handle, 'group' );
+
</ins><span class="cx">                 if ( false !== $group &amp;&amp; $grp &gt; $group )
</span><span class="cx">                         $grp = $group;
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkwpincludesscriptloaderphp"></a>
<div class="modfile"><h4>Modified: trunk/wp-includes/script-loader.php (18495 => 18496)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/wp-includes/script-loader.php        2011-08-01 23:33:56 UTC (rev 18495)
+++ trunk/wp-includes/script-loader.php        2011-08-03 01:54:29 UTC (rev 18496)
</span><span class="lines">@@ -60,17 +60,14 @@
</span><span class="cx"> 
</span><span class="cx">         $scripts-&gt;add( 'utils', &quot;/wp-admin/js/utils$suffix.js&quot;, false, '20101110' );
</span><span class="cx"> 
</span><del>-        $scripts-&gt;add( 'common', &quot;/wp-admin/js/common$suffix.js&quot;, array('jquery', 'hoverIntent', 'utils'), '20110711' );
-        $scripts-&gt;add_data( 'common', 'group', 1 );
</del><ins>+        $scripts-&gt;add( 'common', &quot;/wp-admin/js/common$suffix.js&quot;, array('jquery', 'hoverIntent', 'utils'), '20110711', 1 );
</ins><span class="cx">         $scripts-&gt;add_script_data( 'common', 'commonL10n', array(
</span><span class="cx">                 'warnDelete' =&gt; __(&quot;You are about to permanently delete the selected items.\n  'Cancel' to stop, 'OK' to delete.&quot;)
</span><span class="cx">         ) );
</span><span class="cx"> 
</span><del>-        $scripts-&gt;add( 'sack', &quot;/wp-includes/js/tw-sack$suffix.js&quot;, false, '1.6.1' );
-        $scripts-&gt;add_data( 'sack', 'group', 1 );
</del><ins>+        $scripts-&gt;add( 'sack', &quot;/wp-includes/js/tw-sack$suffix.js&quot;, false, '1.6.1', 1 );
</ins><span class="cx"> 
</span><del>-        $scripts-&gt;add( 'quicktags', &quot;/wp-includes/js/quicktags$suffix.js&quot;, false, '20110502' );
-        $scripts-&gt;add_data( 'quicktags', 'group', 1 );
</del><ins>+        $scripts-&gt;add( 'quicktags', &quot;/wp-includes/js/quicktags$suffix.js&quot;, false, '20110502', 1 );
</ins><span class="cx">         $scripts-&gt;add_script_data( 'quicktags', 'quicktagsL10n', array(
</span><span class="cx">                 'quickLinks' =&gt; __('(Quick Links)'),
</span><span class="cx">                 'wordLookup' =&gt; __('Enter a word to look up:'),
</span><span class="lines">@@ -87,26 +84,21 @@
</span><span class="cx"> 
</span><span class="cx">         $scripts-&gt;add( 'colorpicker', &quot;/wp-includes/js/colorpicker$suffix.js&quot;, array('prototype'), '3517m' );
</span><span class="cx"> 
</span><del>-        $scripts-&gt;add( 'editor', &quot;/wp-admin/js/editor$suffix.js&quot;, array('utils','jquery'), '20110411' );
-        $scripts-&gt;add_data( 'editor', 'group', 1 );
</del><ins>+        $scripts-&gt;add( 'editor', &quot;/wp-admin/js/editor$suffix.js&quot;, array('utils','jquery'), '20110411', 1 );
</ins><span class="cx"> 
</span><del>-        $scripts-&gt;add( 'wp-fullscreen', &quot;/wp-admin/js/wp-fullscreen$suffix.js&quot;, array('jquery'), '20110704' );
-        $scripts-&gt;add_data( 'wp-fullscreen', 'group', 1 );
</del><ins>+        $scripts-&gt;add( 'wp-fullscreen', &quot;/wp-admin/js/wp-fullscreen$suffix.js&quot;, array('jquery'), '20110704', 1 );
</ins><span class="cx"> 
</span><span class="cx">         $scripts-&gt;add( 'prototype', '/wp-includes/js/prototype.js', false, '1.6.1');
</span><span class="cx"> 
</span><del>-        $scripts-&gt;add( 'wp-ajax-response', &quot;/wp-includes/js/wp-ajax-response$suffix.js&quot;, array('jquery'), '20091119' );
-        $scripts-&gt;add_data( 'wp-ajax-response', 'group', 1 );
</del><ins>+        $scripts-&gt;add( 'wp-ajax-response', &quot;/wp-includes/js/wp-ajax-response$suffix.js&quot;, array('jquery'), '20091119', 1 );
</ins><span class="cx">         $scripts-&gt;add_script_data( 'wp-ajax-response', 'wpAjax', array(
</span><span class="cx">                 'noPerm' =&gt; __('You do not have permission to do that.'),
</span><span class="cx">                 'broken' =&gt; __('An unidentified error has occurred.')
</span><span class="cx">         ) );
</span><span class="cx"> 
</span><del>-        $scripts-&gt;add( 'autosave', &quot;/wp-includes/js/autosave$suffix.js&quot;, array('schedule', 'wp-ajax-response'), '20110524' );
-        $scripts-&gt;add_data( 'autosave', 'group', 1 );
</del><ins>+        $scripts-&gt;add( 'autosave', &quot;/wp-includes/js/autosave$suffix.js&quot;, array('schedule', 'wp-ajax-response'), '20110524', 1 );
</ins><span class="cx"> 
</span><del>-        $scripts-&gt;add( 'wp-lists', &quot;/wp-includes/js/wp-lists$suffix.js&quot;, array('wp-ajax-response'), '20110521' );
-        $scripts-&gt;add_data( 'wp-lists', 'group', 1 );
</del><ins>+        $scripts-&gt;add( 'wp-lists', &quot;/wp-includes/js/wp-lists$suffix.js&quot;, array('wp-ajax-response'), '20110521', 1 );
</ins><span class="cx"> 
</span><span class="cx">         $scripts-&gt;add( 'scriptaculous-root', '/wp-includes/js/scriptaculous/wp-scriptaculous.js', array('prototype'), '1.8.3');
</span><span class="cx">         $scripts-&gt;add( 'scriptaculous-builder', '/wp-includes/js/scriptaculous/builder.js', array('scriptaculous-root'), '1.8.3');
</span><span class="lines">@@ -120,71 +112,32 @@
</span><span class="cx">         // not used in core, replaced by Jcrop.js
</span><span class="cx">         $scripts-&gt;add( 'cropper', '/wp-includes/js/crop/cropper.js', array('scriptaculous-dragdrop'), '20070118');
</span><span class="cx"> 
</span><del>-        $scripts-&gt;add( 'jquery', '/wp-includes/js/jquery/jquery.js', false, '1.6.1');
</del><ins>+        $scripts-&gt;add( 'jquery', '/wp-includes/js/jquery/jquery.js', false, '1.6.1' );
+        $scripts-&gt;add( 'jquery-ui-core', '/wp-includes/js/jquery/ui.core.js', array('jquery'), '1.8.12', 1 );
+        $scripts-&gt;add( 'jquery-ui-position', '/wp-includes/js/jquery/ui.position.js', array('jquery-ui-core'), '1.8.12', 1 );
+        $scripts-&gt;add( 'jquery-ui-widget', '/wp-includes/js/jquery/ui.widget.js', array('jquery-ui-core'), '1.8.12', 1 );
+        $scripts-&gt;add( 'jquery-ui-mouse', '/wp-includes/js/jquery/ui.mouse.js', array('jquery-ui-widget'), '1.8.12', 1 );
+        $scripts-&gt;add( 'jquery-ui-button', '/wp-includes/js/jquery/ui.button.js', array('jquery-ui-core', 'jquery-ui-widget'), '1.8.12', 1 );
+        $scripts-&gt;add( 'jquery-ui-tabs', '/wp-includes/js/jquery/ui.tabs.js', array('jquery-ui-core', 'jquery-ui-widget'), '1.8.12', 1 );
+        $scripts-&gt;add( 'jquery-ui-sortable', '/wp-includes/js/jquery/ui.sortable.js', array('jquery-ui-core', 'jquery-ui-mouse'), '1.8.12', 1 );
+        $scripts-&gt;add( 'jquery-ui-draggable', '/wp-includes/js/jquery/ui.draggable.js', array('jquery-ui-core', 'jquery-ui-mouse'), '1.8.12', 1 );
+        $scripts-&gt;add( 'jquery-ui-droppable', '/wp-includes/js/jquery/ui.droppable.js', array('jquery-ui-core', 'jquery-ui-mouse', 'jquery-ui-draggable'), '1.8.12', 1 );
+        $scripts-&gt;add( 'jquery-ui-selectable', '/wp-includes/js/jquery/ui.selectable.js', array('jquery-ui-core', 'jquery-ui-mouse'), '1.8.12', 1 );
+        $scripts-&gt;add( 'jquery-ui-resizable', '/wp-includes/js/jquery/ui.resizable.js', array('jquery-ui-core', 'jquery-ui-mouse'), '1.8.12', 1 );
+        $scripts-&gt;add( 'jquery-ui-dialog', '/wp-includes/js/jquery/ui.dialog.js', array('jquery-ui-resizable', 'jquery-ui-draggable', 'jquery-ui-button', 'jquery-ui-position'), '1.8.12', 1 );
</ins><span class="cx"> 
</span><del>-        $scripts-&gt;add( 'jquery-ui-core', '/wp-includes/js/jquery/ui.core.js', array('jquery'), '1.8.12' );
-        $scripts-&gt;add_data( 'jquery-ui-core', 'group', 1 );
-
-        $scripts-&gt;add( 'jquery-ui-position', '/wp-includes/js/jquery/ui.position.js', array('jquery-ui-core'), '1.8.12' );
-        $scripts-&gt;add_data( 'jquery-ui-position', 'group', 1 );
-
-        $scripts-&gt;add( 'jquery-ui-widget', '/wp-includes/js/jquery/ui.widget.js', array('jquery-ui-core'), '1.8.12' );
-        $scripts-&gt;add_data( 'jquery-ui-widget', 'group', 1 );
-
-        $scripts-&gt;add( 'jquery-ui-mouse', '/wp-includes/js/jquery/ui.mouse.js', array('jquery-ui-widget'), '1.8.12' );
-        $scripts-&gt;add_data( 'jquery-ui-mouse', 'group', 1 );
-
-        $scripts-&gt;add( 'jquery-ui-button', '/wp-includes/js/jquery/ui.button.js', array('jquery-ui-core', 'jquery-ui-widget'), '1.8.12' );
-        $scripts-&gt;add_data( 'jquery-ui-button', 'group', 1 );
-
-        $scripts-&gt;add( 'jquery-ui-tabs', '/wp-includes/js/jquery/ui.tabs.js', array('jquery-ui-core', 'jquery-ui-widget'), '1.8.12' );
-        $scripts-&gt;add_data( 'jquery-ui-tabs', 'group', 1 );
-
-        $scripts-&gt;add( 'jquery-ui-sortable', '/wp-includes/js/jquery/ui.sortable.js', array('jquery-ui-core', 'jquery-ui-mouse'), '1.8.12' );
-        $scripts-&gt;add_data( 'jquery-ui-sortable', 'group', 1 );
-
-        $scripts-&gt;add( 'jquery-ui-draggable', '/wp-includes/js/jquery/ui.draggable.js', array('jquery-ui-core', 'jquery-ui-mouse'), '1.8.12' );
-        $scripts-&gt;add_data( 'jquery-ui-draggable', 'group', 1 );
-
-        $scripts-&gt;add( 'jquery-ui-droppable', '/wp-includes/js/jquery/ui.droppable.js', array('jquery-ui-core', 'jquery-ui-mouse', 'jquery-ui-draggable'), '1.8.12' );
-        $scripts-&gt;add_data( 'jquery-ui-droppable', 'group', 1 );
-
-        $scripts-&gt;add( 'jquery-ui-selectable', '/wp-includes/js/jquery/ui.selectable.js', array('jquery-ui-core', 'jquery-ui-mouse'), '1.8.12' );
-        $scripts-&gt;add_data( 'jquery-ui-selectable', 'group', 1 );
-
-        $scripts-&gt;add( 'jquery-ui-resizable', '/wp-includes/js/jquery/ui.resizable.js', array('jquery-ui-core', 'jquery-ui-mouse'), '1.8.12' );
-        $scripts-&gt;add_data( 'jquery-ui-resizable', 'group', 1 );
-
-        $scripts-&gt;add( 'jquery-ui-dialog', '/wp-includes/js/jquery/ui.dialog.js', array('jquery-ui-resizable', 'jquery-ui-draggable', 'jquery-ui-button', 'jquery-ui-position'), '1.8.12' );
-        $scripts-&gt;add_data( 'jquery-ui-dialog', 'group', 1 );
-
</del><span class="cx">         // deprecated, not used in core, most functionality is included in jQuery 1.3
</span><del>-        $scripts-&gt;add( 'jquery-form', &quot;/wp-includes/js/jquery/jquery.form$suffix.js&quot;, array('jquery'), '2.73');
-        $scripts-&gt;add_data( 'jquery-form', 'group', 1 );
</del><ins>+        $scripts-&gt;add( 'jquery-form', &quot;/wp-includes/js/jquery/jquery.form$suffix.js&quot;, array('jquery'), '2.73', 1 );
</ins><span class="cx"> 
</span><del>-        $scripts-&gt;add( 'jquery-color', &quot;/wp-includes/js/jquery/jquery.color$suffix.js&quot;, array('jquery'), '2.0-4561m');
-        $scripts-&gt;add_data( 'jquery-color', 'group', 1 );
</del><ins>+        $scripts-&gt;add( 'jquery-color', &quot;/wp-includes/js/jquery/jquery.color$suffix.js&quot;, array('jquery'), '2.0-4561m', 1 );
+        $scripts-&gt;add( 'suggest', &quot;/wp-includes/js/jquery/suggest$suffix.js&quot;, array('jquery'), '1.1-20110113', 1 );
+        $scripts-&gt;add( 'schedule', '/wp-includes/js/jquery/jquery.schedule.js', array('jquery'), '20m', 1 );
+        $scripts-&gt;add( 'jquery-query', &quot;/wp-includes/js/jquery/jquery.query.js&quot;, array('jquery'), '2.1.7', 1 );
+        $scripts-&gt;add( 'jquery-serialize-object', &quot;/wp-includes/js/jquery/jquery.serialize-object.js&quot;, array('jquery'), '0.2', 1 );
+        $scripts-&gt;add( 'jquery-hotkeys', &quot;/wp-includes/js/jquery/jquery.hotkeys$suffix.js&quot;, array('jquery'), '0.0.2m', 1 );
+        $scripts-&gt;add( 'jquery-table-hotkeys', &quot;/wp-includes/js/jquery/jquery.table-hotkeys$suffix.js&quot;, array('jquery', 'jquery-hotkeys'), '20090102', 1 );
</ins><span class="cx"> 
</span><del>-        $scripts-&gt;add( 'suggest', &quot;/wp-includes/js/jquery/suggest$suffix.js&quot;, array('jquery'), '1.1-20110113');
-        $scripts-&gt;add_data( 'suggest', 'group', 1 );
-
-        $scripts-&gt;add( 'schedule', '/wp-includes/js/jquery/jquery.schedule.js', array('jquery'), '20m');
-        $scripts-&gt;add_data( 'schedule', 'group', 1 );
-
-        $scripts-&gt;add( 'jquery-query', &quot;/wp-includes/js/jquery/jquery.query.js&quot;, array('jquery'), '2.1.7' );
-        $scripts-&gt;add_data( 'jquery-query', 'group', 1 );
-
-        $scripts-&gt;add( 'jquery-serialize-object', &quot;/wp-includes/js/jquery/jquery.serialize-object.js&quot;, array('jquery'), '0.2' );
-        $scripts-&gt;add_data( 'jquery-serialize-object', 'group', 1 );
-
-        $scripts-&gt;add( 'jquery-hotkeys', &quot;/wp-includes/js/jquery/jquery.hotkeys$suffix.js&quot;, array('jquery'), '0.0.2m' );
-        $scripts-&gt;add_data( 'jquery-hotkeys', 'group', 1 );
-
-        $scripts-&gt;add( 'jquery-table-hotkeys', &quot;/wp-includes/js/jquery/jquery.table-hotkeys$suffix.js&quot;, array('jquery', 'jquery-hotkeys'), '20090102' );
-        $scripts-&gt;add_data( 'jquery-table-hotkeys', 'group', 1 );
-
-        $scripts-&gt;add( 'thickbox', &quot;/wp-includes/js/thickbox/thickbox.js&quot;, array('jquery'), '3.1-20110528');
-        $scripts-&gt;add_data( 'thickbox', 'group', 1 );
</del><ins>+        $scripts-&gt;add( 'thickbox', &quot;/wp-includes/js/thickbox/thickbox.js&quot;, array('jquery'), '3.1-20110528', 1 );
</ins><span class="cx">         $scripts-&gt;add_script_data( 'thickbox', 'thickboxL10n', array(
</span><span class="cx">                         'next' =&gt; __('Next &amp;gt;'),
</span><span class="cx">                         'prev' =&gt; __('&amp;lt; Prev'),
</span><span class="lines">@@ -205,7 +158,7 @@
</span><span class="cx">         
</span><span class="cx">         if ( empty($max_upload_size) )
</span><span class="cx">                 $max_upload_size = __('not configured');
</span><del>-        
</del><ins>+
</ins><span class="cx">         // error messagoe for both plupload and swfupload
</span><span class="cx">         $uploader_l10n = array(
</span><span class="cx">                 'queue_limit_exceeded' =&gt; __('You have attempted to queue too many files.'),
</span><span class="lines">@@ -263,11 +216,9 @@
</span><span class="cx"> 
</span><span class="cx">         $scripts-&gt;add( 'json2', &quot;/wp-includes/js/json2$suffix.js&quot;, false, '2011-02-23');
</span><span class="cx"> 
</span><del>-        $scripts-&gt;add( 'imgareaselect', &quot;/wp-includes/js/imgareaselect/jquery.imgareaselect$suffix.js&quot;, array('jquery'), '0.9.6-20110515' );
-        $scripts-&gt;add_data( 'imgareaselect', 'group', 1 );
</del><ins>+        $scripts-&gt;add( 'imgareaselect', &quot;/wp-includes/js/imgareaselect/jquery.imgareaselect$suffix.js&quot;, array('jquery'), '0.9.6-20110515', 1 );
</ins><span class="cx"> 
</span><del>-        $scripts-&gt;add( 'password-strength-meter', &quot;/wp-admin/js/password-strength-meter$suffix.js&quot;, array('jquery'), '20101027' );
-        $scripts-&gt;add_data( 'password-strength-meter', 'group', 1 );
</del><ins>+        $scripts-&gt;add( 'password-strength-meter', &quot;/wp-admin/js/password-strength-meter$suffix.js&quot;, array('jquery'), '20101027', 1 );
</ins><span class="cx">         $scripts-&gt;add_script_data( 'password-strength-meter', 'pwsL10n', array(
</span><span class="cx">                 'empty' =&gt; __('Strength indicator'),
</span><span class="cx">                 'short' =&gt; __('Very weak'),
</span><span class="lines">@@ -278,14 +229,12 @@
</span><span class="cx">                 'mismatch' =&gt; __('Mismatch')
</span><span class="cx">         ) );
</span><span class="cx"> 
</span><del>-        $scripts-&gt;add( 'user-profile', &quot;/wp-admin/js/user-profile$suffix.js&quot;, array( 'jquery', 'password-strength-meter' ), '20110628' );
-        $scripts-&gt;add_data( 'user-profile', 'group', 1 );
</del><ins>+        $scripts-&gt;add( 'user-profile', &quot;/wp-admin/js/user-profile$suffix.js&quot;, array( 'jquery', 'password-strength-meter' ), '20110628', 1 );
</ins><span class="cx"> 
</span><span class="cx">         $scripts-&gt;add( 'admin-bar', &quot;/wp-includes/js/admin-bar$suffix.js&quot;, false, '20110801' );
</span><span class="cx">         $scripts-&gt;add_data( 'admin-bar', 'group', 1 );
</span><span class="cx"> 
</span><del>-        $scripts-&gt;add( 'wplink', &quot;/wp-includes/js/tinymce/plugins/wplink/js/wplink$suffix.js&quot;, array( 'jquery', 'wpdialogs' ), '20110727' );
-        $scripts-&gt;add_data( 'wplink', 'group', 1 );
</del><ins>+        $scripts-&gt;add( 'wplink', &quot;/wp-includes/js/tinymce/plugins/wplink/js/wplink$suffix.js&quot;, array( 'jquery', 'wpdialogs' ), '20110727', 1 );
</ins><span class="cx">         $scripts-&gt;add_script_data( 'wplink', 'wpLinkL10n', array(
</span><span class="cx">                 'title' =&gt; __('Insert/edit link'),
</span><span class="cx">                 'update' =&gt; __('Update'),
</span><span class="lines">@@ -294,11 +243,9 @@
</span><span class="cx">                 'noMatchesFound' =&gt; __('No matches found.')
</span><span class="cx">         ) );
</span><span class="cx"> 
</span><del>-        $scripts-&gt;add( 'wpdialogs', &quot;/wp-includes/js/tinymce/plugins/wpdialogs/js/wpdialog$suffix.js&quot;, array( 'jquery-ui-dialog' ), '20110528' );
-        $scripts-&gt;add_data( 'wpdialogs', 'group', 1 );
</del><ins>+        $scripts-&gt;add( 'wpdialogs', &quot;/wp-includes/js/tinymce/plugins/wpdialogs/js/wpdialog$suffix.js&quot;, array( 'jquery-ui-dialog' ), '20110528', 1 );
</ins><span class="cx"> 
</span><del>-        $scripts-&gt;add( 'wpdialogs-popup', &quot;/wp-includes/js/tinymce/plugins/wpdialogs/js/popup$suffix.js&quot;, array( 'wpdialogs' ), '20110421' );
-        $scripts-&gt;add_data( 'wpdialogs-popup', 'group', 1 );
</del><ins>+        $scripts-&gt;add( 'wpdialogs-popup', &quot;/wp-includes/js/tinymce/plugins/wpdialogs/js/popup$suffix.js&quot;, array( 'wpdialogs' ), '20110421', 1 );
</ins><span class="cx"> 
</span><span class="cx">         if ( is_admin() ) {
</span><span class="cx">                 $scripts-&gt;add( 'ajaxcat', &quot;/wp-admin/js/cat$suffix.js&quot;, array( 'wp-lists' ), '20090102' );
</span><span class="lines">@@ -308,21 +255,17 @@
</span><span class="cx">                         'how' =&gt; __('Separate multiple categories with commas.')
</span><span class="cx">                 ) );
</span><span class="cx"> 
</span><del>-                $scripts-&gt;add( 'admin-categories', &quot;/wp-admin/js/categories$suffix.js&quot;, array('wp-lists'), '20091201' );
-                $scripts-&gt;add_data( 'admin-categories', 'group', 1 );
</del><ins>+                $scripts-&gt;add( 'admin-categories', &quot;/wp-admin/js/categories$suffix.js&quot;, array('wp-lists'), '20091201', 1 );
</ins><span class="cx"> 
</span><del>-                $scripts-&gt;add( 'admin-tags', &quot;/wp-admin/js/tags$suffix.js&quot;, array('jquery', 'wp-ajax-response'), '20110429' );
-                $scripts-&gt;add_data( 'admin-tags', 'group', 1 );
</del><ins>+                $scripts-&gt;add( 'admin-tags', &quot;/wp-admin/js/tags$suffix.js&quot;, array('jquery', 'wp-ajax-response'), '20110429', 1 );
</ins><span class="cx">                 $scripts-&gt;add_script_data( 'admin-tags', 'tagsl10n', array(
</span><span class="cx">                         'noPerm' =&gt; __('You do not have permission to do that.'),
</span><span class="cx">                         'broken' =&gt; __('An unidentified error has occurred.')
</span><span class="cx">                 ));
</span><span class="cx"> 
</span><del>-                $scripts-&gt;add( 'admin-custom-fields', &quot;/wp-admin/js/custom-fields$suffix.js&quot;, array('wp-lists'), '20110429' );
-                $scripts-&gt;add_data( 'admin-custom-fields', 'group', 1 );
</del><ins>+                $scripts-&gt;add( 'admin-custom-fields', &quot;/wp-admin/js/custom-fields$suffix.js&quot;, array('wp-lists'), '20110429', 1 );
</ins><span class="cx"> 
</span><del>-                $scripts-&gt;add( 'admin-comments', &quot;/wp-admin/js/edit-comments$suffix.js&quot;, array('wp-lists', 'jquery-ui-resizable', 'quicktags', 'jquery-query'), '20110602' );
-                $scripts-&gt;add_data( 'admin-comments', 'group', 1 );
</del><ins>+                $scripts-&gt;add( 'admin-comments', &quot;/wp-admin/js/edit-comments$suffix.js&quot;, array('wp-lists', 'jquery-ui-resizable', 'quicktags', 'jquery-query'), '20110602', 1 );
</ins><span class="cx">                 $scripts-&gt;add_script_data( 'admin-comments', 'adminCommentsL10n', array(
</span><span class="cx">                         'hotkeys_highlight_first' =&gt; isset($_GET['hotkeys_highlight_first']),
</span><span class="cx">                         'hotkeys_highlight_last' =&gt; isset($_GET['hotkeys_highlight_last']),
</span><span class="lines">@@ -330,14 +273,11 @@
</span><span class="cx">                         'reply' =&gt; __( 'Reply' )
</span><span class="cx">                 ) );
</span><span class="cx"> 
</span><del>-                $scripts-&gt;add( 'xfn', &quot;/wp-admin/js/xfn$suffix.js&quot;, array('jquery'), '20110524' );
-                $scripts-&gt;add_data( 'xfn', 'group', 1 );
</del><ins>+                $scripts-&gt;add( 'xfn', &quot;/wp-admin/js/xfn$suffix.js&quot;, array('jquery'), '20110524', 1 );
</ins><span class="cx"> 
</span><del>-                $scripts-&gt;add( 'postbox', &quot;/wp-admin/js/postbox$suffix.js&quot;, array('jquery-ui-sortable'), '20110612' );
-                $scripts-&gt;add_data( 'postbox', 'group', 1 );
</del><ins>+                $scripts-&gt;add( 'postbox', &quot;/wp-admin/js/postbox$suffix.js&quot;, array('jquery-ui-sortable'), '20110612', 1 );
</ins><span class="cx"> 
</span><del>-                $scripts-&gt;add( 'post', &quot;/wp-admin/js/post$suffix.js&quot;, array('suggest', 'wp-lists', 'postbox'), '20110524' );
-                $scripts-&gt;add_data( 'post', 'group', 1 );
</del><ins>+                $scripts-&gt;add( 'post', &quot;/wp-admin/js/post$suffix.js&quot;, array('suggest', 'wp-lists', 'postbox'), '20110524', 1 );
</ins><span class="cx">                 $scripts-&gt;add_script_data( 'post', 'postL10n', array(
</span><span class="cx">                         'ok' =&gt; __('OK'),
</span><span class="cx">                         'cancel' =&gt; __('Cancel'),
</span><span class="lines">@@ -359,8 +299,7 @@
</span><span class="cx">                         'published' =&gt; __('Published')
</span><span class="cx">                 ) );
</span><span class="cx"> 
</span><del>-                $scripts-&gt;add( 'link', &quot;/wp-admin/js/link$suffix.js&quot;, array('wp-lists', 'postbox'), '20110524' );
-                $scripts-&gt;add_data( 'link', 'group', 1 );
</del><ins>+                $scripts-&gt;add( 'link', &quot;/wp-admin/js/link$suffix.js&quot;, array('wp-lists', 'postbox'), '20110524', 1 );
</ins><span class="cx"> 
</span><span class="cx">                 $scripts-&gt;add( 'comment', &quot;/wp-admin/js/comment$suffix.js&quot;, array('jquery'), '20110429' );
</span><span class="cx">                 $scripts-&gt;add_data( 'comment', 'group', 1 );
</span><span class="lines">@@ -370,37 +309,29 @@
</span><span class="cx"> 
</span><span class="cx">                 $scripts-&gt;add( 'admin-gallery', &quot;/wp-admin/js/gallery$suffix.js&quot;, array( 'jquery-ui-sortable' ), '20110414' );
</span><span class="cx"> 
</span><del>-                $scripts-&gt;add( 'media-upload', &quot;/wp-admin/js/media-upload$suffix.js&quot;, array( 'thickbox' ), '20110425' );
-                $scripts-&gt;add_data( 'media-upload', 'group', 1 );
</del><ins>+                $scripts-&gt;add( 'media-upload', &quot;/wp-admin/js/media-upload$suffix.js&quot;, array( 'thickbox' ), '20110425', 1 );
</ins><span class="cx"> 
</span><del>-                $scripts-&gt;add( 'admin-widgets', &quot;/wp-admin/js/widgets$suffix.js&quot;, array( 'jquery-ui-sortable', 'jquery-ui-draggable', 'jquery-ui-droppable' ), '20110601' );
-                $scripts-&gt;add_data( 'admin-widgets', 'group', 1 );
</del><ins>+                $scripts-&gt;add( 'admin-widgets', &quot;/wp-admin/js/widgets$suffix.js&quot;, array( 'jquery-ui-sortable', 'jquery-ui-draggable', 'jquery-ui-droppable' ), '20110601', 1 );
</ins><span class="cx"> 
</span><del>-                $scripts-&gt;add( 'word-count', &quot;/wp-admin/js/word-count$suffix.js&quot;, array( 'jquery' ), '20110515' );
-                $scripts-&gt;add_data( 'word-count', 'group', 1 );
</del><ins>+                $scripts-&gt;add( 'word-count', &quot;/wp-admin/js/word-count$suffix.js&quot;, array( 'jquery' ), '20110515', 1 );
</ins><span class="cx"> 
</span><del>-                $scripts-&gt;add( 'theme', &quot;/wp-admin/js/theme$suffix.js&quot;, array( 'thickbox' ), '20110118' );
-                $scripts-&gt;add_data( 'theme', 'group', 1 );
</del><ins>+                $scripts-&gt;add( 'theme', &quot;/wp-admin/js/theme$suffix.js&quot;, array( 'thickbox' ), '20110118', 1 );
</ins><span class="cx"> 
</span><del>-                $scripts-&gt;add( 'theme-preview', &quot;/wp-admin/js/theme-preview$suffix.js&quot;, array( 'thickbox', 'jquery' ), '20100407' );
-                $scripts-&gt;add_data( 'theme-preview', 'group', 1 );
</del><ins>+                $scripts-&gt;add( 'theme-preview', &quot;/wp-admin/js/theme-preview$suffix.js&quot;, array( 'thickbox', 'jquery' ), '20100407', 1 );
</ins><span class="cx"> 
</span><del>-                $scripts-&gt;add( 'inline-edit-post', &quot;/wp-admin/js/inline-edit-post$suffix.js&quot;, array( 'jquery', 'suggest' ), '20110609' );
-                $scripts-&gt;add_data( 'inline-edit-post', 'group', 1 );
</del><ins>+                $scripts-&gt;add( 'inline-edit-post', &quot;/wp-admin/js/inline-edit-post$suffix.js&quot;, array( 'jquery', 'suggest' ), '20110609', 1 );
</ins><span class="cx">                 $scripts-&gt;add_script_data( 'inline-edit-post', 'inlineEditL10n', array(
</span><span class="cx">                         'error' =&gt; __('Error while saving the changes.'),
</span><span class="cx">                         'ntdeltitle' =&gt; __('Remove From Bulk Edit'),
</span><span class="cx">                         'notitle' =&gt; __('(no title)')
</span><span class="cx">                 ) );
</span><span class="cx"> 
</span><del>-                $scripts-&gt;add( 'inline-edit-tax', &quot;/wp-admin/js/inline-edit-tax$suffix.js&quot;, array( 'jquery' ), '20110609' );
-                $scripts-&gt;add_data( 'inline-edit-tax', 'group', 1 );
</del><ins>+                $scripts-&gt;add( 'inline-edit-tax', &quot;/wp-admin/js/inline-edit-tax$suffix.js&quot;, array( 'jquery' ), '20110609', 1 );
</ins><span class="cx">                 $scripts-&gt;add_script_data( 'inline-edit-tax', 'inlineEditL10n', array(
</span><span class="cx">                         'error' =&gt; __('Error while saving the changes.')
</span><span class="cx">                 ) );
</span><span class="cx"> 
</span><del>-                $scripts-&gt;add( 'plugin-install', &quot;/wp-admin/js/plugin-install$suffix.js&quot;, array( 'jquery', 'thickbox' ), '20110113' );
-                $scripts-&gt;add_data( 'plugin-install', 'group', 1 );
</del><ins>+                $scripts-&gt;add( 'plugin-install', &quot;/wp-admin/js/plugin-install$suffix.js&quot;, array( 'jquery', 'thickbox' ), '20110113', 1 );
</ins><span class="cx">                 $scripts-&gt;add_script_data( 'plugin-install', 'plugininstallL10n', array(
</span><span class="cx">                         'plugin_information' =&gt; __('Plugin Information:'),
</span><span class="cx">                         'ays' =&gt; __('Are you sure you want to install this plugin?')
</span><span class="lines">@@ -408,22 +339,17 @@
</span><span class="cx"> 
</span><span class="cx">                 $scripts-&gt;add( 'farbtastic', '/wp-admin/js/farbtastic.js', array('jquery'), '1.2' );
</span><span class="cx"> 
</span><del>-                $scripts-&gt;add( 'dashboard', &quot;/wp-admin/js/dashboard$suffix.js&quot;, array( 'jquery', 'admin-comments', 'postbox' ), '20110524' );
-                $scripts-&gt;add_data( 'dashboard', 'group', 1 );
</del><ins>+                $scripts-&gt;add( 'dashboard', &quot;/wp-admin/js/dashboard$suffix.js&quot;, array( 'jquery', 'admin-comments', 'postbox' ), '20110524', 1 );
</ins><span class="cx"> 
</span><del>-                $scripts-&gt;add( 'hoverIntent', &quot;/wp-includes/js/hoverIntent$suffix.js&quot;, array('jquery'), '20090102' );
-                $scripts-&gt;add_data( 'hoverIntent', 'group', 1 );
</del><ins>+                $scripts-&gt;add( 'hoverIntent', &quot;/wp-includes/js/hoverIntent$suffix.js&quot;, array('jquery'), '20090102', 1 );
</ins><span class="cx"> 
</span><span class="cx">                 $scripts-&gt;add( 'list-revisions', &quot;/wp-includes/js/wp-list-revisions$suffix.js&quot;, null, '20091223' );
</span><span class="cx"> 
</span><del>-                $scripts-&gt;add( 'media', &quot;/wp-admin/js/media$suffix.js&quot;, array( 'jquery-ui-draggable' ), '20101022' );
-                $scripts-&gt;add_data( 'media', 'group', 1 );
</del><ins>+                $scripts-&gt;add( 'media', &quot;/wp-admin/js/media$suffix.js&quot;, array( 'jquery-ui-draggable' ), '20101022', 1 );
</ins><span class="cx"> 
</span><del>-                $scripts-&gt;add( 'image-edit', &quot;/wp-admin/js/image-edit$suffix.js&quot;, array('jquery', 'json2', 'imgareaselect'), '20110524' );
-                $scripts-&gt;add_data( 'image-edit', 'group', 1 );
</del><ins>+                $scripts-&gt;add( 'image-edit', &quot;/wp-admin/js/image-edit$suffix.js&quot;, array('jquery', 'json2', 'imgareaselect'), '20110524', 1 );
</ins><span class="cx"> 
</span><del>-                $scripts-&gt;add( 'set-post-thumbnail', &quot;/wp-admin/js/set-post-thumbnail$suffix.js&quot;, array( 'jquery' ), '20100518' );
-                $scripts-&gt;add_data( 'set-post-thumbnail', 'group', 1 );
</del><ins>+                $scripts-&gt;add( 'set-post-thumbnail', &quot;/wp-admin/js/set-post-thumbnail$suffix.js&quot;, array( 'jquery' ), '20100518', 1 );
</ins><span class="cx">                 $scripts-&gt;add_script_data( 'set-post-thumbnail', 'setPostThumbnailL10n', array(
</span><span class="cx">                         'setThumbnail' =&gt; __( 'Use as featured image' ),
</span><span class="cx">                         'saving' =&gt; __( 'Saving...' ),
</span><span class="lines">@@ -439,8 +365,7 @@
</span><span class="cx">                         'saveAlert' =&gt; __('The changes you made will be lost if you navigate away from this page.')
</span><span class="cx">                 ) );
</span><span class="cx"> 
</span><del>-                $scripts-&gt;add( 'custom-background', &quot;/wp-admin/js/custom-background$suffix.js&quot;, array('farbtastic'), '20110511' );
-                $scripts-&gt;add_data( 'custom-background', 'group', 1 );
</del><ins>+                $scripts-&gt;add( 'custom-background', &quot;/wp-admin/js/custom-background$suffix.js&quot;, array('farbtastic'), '20110511', 1 );
</ins><span class="cx">         }
</span><span class="cx"> }
</span><span class="cx"> 
</span></span></pre>
</div>
</div>

</body>
</html>