Don't load all includes by default. We have our own script loader. fixes #4512
git-svn-id: https://develop.svn.wordpress.org/trunk@5794 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
9d34d5cdef
commit
f1dfa6dec0
@ -49,10 +49,11 @@ var Scriptaculous = {
|
||||
}).each( function(s) {
|
||||
var path = s.src.replace(/scriptaculous\.js(\?.*)?$/,'');
|
||||
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') });
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
Scriptaculous.load();
|
||||
Scriptaculous.load();
|
||||
|
@ -49,10 +49,11 @@ var Scriptaculous = {
|
||||
}).each( function(s) {
|
||||
var path = s.src.replace(/scriptaculous\.js(\?.*)?$/,'');
|
||||
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') });
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
Scriptaculous.load();
|
||||
Scriptaculous.load();
|
||||
|
@ -60,7 +60,7 @@ class WP_Scripts {
|
||||
'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-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');
|
||||
|
Loading…
Reference in New Issue
Block a user