mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-03-24 07:14:28 +00:00
Cleanup js files and prepare for concatenating, move most inline js to files
git-svn-id: https://develop.svn.wordpress.org/trunk@10348 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
@@ -42,7 +42,13 @@ function wp_default_scripts( &$scripts ) {
|
||||
$scripts->default_version = get_bloginfo( 'version' );
|
||||
$suffix = defined('SCRIPT_DEBUG') && SCRIPT_DEBUG ? '.dev' : '';
|
||||
|
||||
$scripts->add( 'common', "/wp-admin/js/common$suffix.js", array('jquery', 'hoverIntent'), '20090106' );
|
||||
$scripts->add( 'utils', "/wp-admin/js/utils$suffix.js", false, '20090102' );
|
||||
|
||||
$scripts->add( 'common', "/wp-admin/js/common$suffix.js", array('jquery', 'hoverIntent', 'utils'), '20090106' );
|
||||
$scripts->localize( 'common', 'commonL10n', array(
|
||||
'warnDelete' => __("You are about to delete the selected items.\n 'Cancel' to stop, 'OK' to delete."),
|
||||
'l10n_print_after' => 'try{convertEntities(commonL10n);}catch(e){};'
|
||||
) );
|
||||
|
||||
$scripts->add( 'sack', "/wp-includes/js/tw-sack$suffix.js", false, '1.6.1' );
|
||||
|
||||
@@ -183,8 +189,6 @@ function wp_default_scripts( &$scripts ) {
|
||||
'hotkeys_highlight_last' => isset($_GET['hotkeys_highlight_last'])
|
||||
) );
|
||||
|
||||
$scripts->add( 'admin-users', "/wp-admin/js/users$suffix.js", array('wp-lists'), '20090102' );
|
||||
|
||||
$scripts->add( 'xfn', "/wp-admin/js/xfn$suffix.js", false, '3517m' );
|
||||
|
||||
$scripts->add( 'postbox', "/wp-admin/js/postbox$suffix.js", array('jquery-ui-sortable'), '20090102' );
|
||||
@@ -404,7 +408,6 @@ function wp_prototype_before_jquery( $js_array ) {
|
||||
* @since 2.5.0
|
||||
*/
|
||||
function wp_just_in_time_script_localization() {
|
||||
global $current_user;
|
||||
|
||||
wp_localize_script( 'autosave', 'autosaveL10n', array(
|
||||
'autosaveInterval' => AUTOSAVE_INTERVAL,
|
||||
@@ -414,13 +417,6 @@ function wp_just_in_time_script_localization() {
|
||||
'savingText' => __('Saving Draft…'),
|
||||
'l10n_print_after' => 'try{convertEntities(autosaveL10n);}catch(e){};'
|
||||
) );
|
||||
|
||||
$userid = isset($current_user) ? $current_user->ID : 0;
|
||||
wp_localize_script( 'common', 'userSettings', array(
|
||||
'url' => SITECOOKIEPATH,
|
||||
'uid' => $userid,
|
||||
'time' => time()
|
||||
) );
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user