Don't load all includes by default. We have our own script loader. fixes #4512
git-svn-id: http://svn.automattic.com/wordpress/trunk@5794 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
6eb4acd7fd
commit
b4557ec25b
|
@ -49,7 +49,8 @@ var Scriptaculous = {
|
||||||
}).each( function(s) {
|
}).each( function(s) {
|
||||||
var path = s.src.replace(/scriptaculous\.js(\?.*)?$/,'');
|
var path = s.src.replace(/scriptaculous\.js(\?.*)?$/,'');
|
||||||
var includes = s.src.match(/\?.*load=([a-z,]*)/);
|
var includes = s.src.match(/\?.*load=([a-z,]*)/);
|
||||||
(includes ? includes[1] : 'builder,effects,dragdrop,controls,slider,sound').split(',').each(
|
if ( includes )
|
||||||
|
includes[1].split(',').each(
|
||||||
function(include) { Scriptaculous.require(path+include+'.js') });
|
function(include) { Scriptaculous.require(path+include+'.js') });
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
|
@ -49,7 +49,8 @@ var Scriptaculous = {
|
||||||
}).each( function(s) {
|
}).each( function(s) {
|
||||||
var path = s.src.replace(/scriptaculous\.js(\?.*)?$/,'');
|
var path = s.src.replace(/scriptaculous\.js(\?.*)?$/,'');
|
||||||
var includes = s.src.match(/\?.*load=([a-z,]*)/);
|
var includes = s.src.match(/\?.*load=([a-z,]*)/);
|
||||||
(includes ? includes[1] : 'builder,effects,dragdrop,controls,slider,sound').split(',').each(
|
if ( includes )
|
||||||
|
includes[1].split(',').each(
|
||||||
function(include) { Scriptaculous.require(path+include+'.js') });
|
function(include) { Scriptaculous.require(path+include+'.js') });
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
|
@ -60,7 +60,7 @@ class WP_Scripts {
|
||||||
'delText' => __('Are you sure you want to delete this %thing%?')
|
'delText' => __('Are you sure you want to delete this %thing%?')
|
||||||
) );
|
) );
|
||||||
|
|
||||||
$this->add( 'scriptaculous-root', '/wp-includes/js/scriptaculous/wp-scriptaculous.js', array('prototype'), '1.7.1-b3');
|
$this->add( 'scriptaculous-root', '/wp-includes/js/scriptaculous/scriptaculous.js', array('prototype'), '1.7.1-b3');
|
||||||
$this->add( 'scriptaculous-builder', '/wp-includes/js/scriptaculous/builder.js', array('scriptaculous-root'), '1.7.1-b3');
|
$this->add( 'scriptaculous-builder', '/wp-includes/js/scriptaculous/builder.js', array('scriptaculous-root'), '1.7.1-b3');
|
||||||
$this->add( 'scriptaculous-dragdrop', '/wp-includes/js/scriptaculous/dragdrop.js', array('scriptaculous-builder', 'scriptaculous-effects'), '1.7.1-b3');
|
$this->add( 'scriptaculous-dragdrop', '/wp-includes/js/scriptaculous/dragdrop.js', array('scriptaculous-builder', 'scriptaculous-effects'), '1.7.1-b3');
|
||||||
$this->add( 'scriptaculous-effects', '/wp-includes/js/scriptaculous/effects.js', array('scriptaculous-root'), '1.7.1-b3');
|
$this->add( 'scriptaculous-effects', '/wp-includes/js/scriptaculous/effects.js', array('scriptaculous-root'), '1.7.1-b3');
|
||||||
|
|
Loading…
Reference in New Issue