+/**
+ * WordPress scripts and styles default loader.
+ *
+ * Most of the functionality that existed here was moved to
+ * {@link http://backpress.automattic.com/ BackPress}. WordPress themes and
+ * plugins will only be concerned about the filters and actions set in this
+ * file.
+ *
+ * Several constants are used to manage the loading, concatenating and compression of scripts and CSS:
+ * define('SCRIPT_DEBUG', true); loads the development (non-minified) versions of all scripts and disables compression and concatenation,
+ * define('STYLE_DEBUG', true); loads the development (non-minified) versions of all CSS and disables compression and concatenation,
+ * define('CONCATENATE_SCRIPTS', false); disables compression and concatenation of scripts and CSS,
+ * define('COMPRESS_SCRIPTS', false); disables compression of scripts,
+ * define('COMPRESS_CSS', false); disables compression of CSS,
+ * define('ENFORCE_GZIP', true); forces gzip for compression (default is deflate).
+ *
+ * The globals $concatenate_scripts, $compress_scripts and $compress_css can be set by plugins
+ * to temporarily override the above settings. Also a compression test is run once and the result is saved
+ * as option 'can_compress_scripts' (0/1). The test will run again if that option is deleted.
+ *
+ * @package WordPress
+ */
+
+/** BackPress: WordPress Dependencies Class */
+require( ABSPATH . WPINC . '/class.wp-dependencies.php' );
+
+/** BackPress: WordPress Scripts Class */
+require( ABSPATH . WPINC . '/class.wp-scripts.php' );
+
+/** BackPress: WordPress Scripts Functions */
+require( ABSPATH . WPINC . '/functions.wp-scripts.php' );
+
+/** BackPress: WordPress Styles Class */
+require( ABSPATH . WPINC . '/class.wp-styles.php' );
+
+/** BackPress: WordPress Styles Functions */
+require( ABSPATH . WPINC . '/functions.wp-styles.php' );
+
+/**
+ * Setup WordPress scripts to load by default for Administration Panels.
+ *
+ * Localizes a few of the scripts.
+ * $scripts->add_data( 'script-handle', 'group', 1 ); queues the script for the footer
+ *
+ * @since 2.6.0
+ *
+ * @param object $scripts WP_Scripts object.
+ */
+function wp_default_scripts( &$scripts ) {
+
+ if ( !$guessurl = site_url() )
+ $guessurl = wp_guess_url();
+
+ $scripts->base_url = $guessurl;
+ $scripts->content_url = defined('WP_CONTENT_URL')? WP_CONTENT_URL : '';
+ $scripts->default_version = get_bloginfo( 'version' );
+ $scripts->default_dirs = array('/wp-admin/js/', '/wp-includes/js/');
+
+ $suffix = defined('SCRIPT_DEBUG') && SCRIPT_DEBUG ? '.dev' : '';
+
+ $scripts->add( 'utils', "/wp-admin/js/utils$suffix.js", false, '20090102' );
+
+ $scripts->add( 'common', "/wp-admin/js/common$suffix.js", array('jquery', 'hoverIntent', 'utils'), '20091212' );
+ $scripts->add_data( 'common', 'group', 1 );
+ $scripts->localize( 'common', 'commonL10n', array(
+ 'warnDelete' => __("You are about to permanently 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' );
+ $scripts->add_data( 'sack', 'group', 1 );
+
+ $scripts->add( 'quicktags', "/wp-includes/js/quicktags$suffix.js", false, '20090307' );
+ $scripts->localize( 'quicktags', 'quicktagsL10n', array(
+ 'quickLinks' => __('(Quick Links)'),
+ 'wordLookup' => __('Enter a word to look up:'),
+ 'dictionaryLookup' => esc_attr(__('Dictionary lookup')),
+ 'lookup' => esc_attr(__('lookup')),
+ 'closeAllOpenTags' => esc_attr(__('Close all open tags')),
+ 'closeTags' => esc_attr(__('close tags')),
+ 'enterURL' => __('Enter the URL'),
+ 'enterImageURL' => __('Enter the URL of the image'),
+ 'enterImageDescription' => __('Enter a description of the image'),
+ 'l10n_print_after' => 'try{convertEntities(quicktagsL10n);}catch(e){};'
+ ) );
+
+ $scripts->add( 'colorpicker', "/wp-includes/js/colorpicker$suffix.js", array('prototype'), '3517m' );
+
+ $scripts->add( 'editor', "/wp-admin/js/editor$suffix.js", false, '20091124' );
+
+ $scripts->add( 'prototype', '/wp-includes/js/prototype.js', false, '1.6');
+
+ $scripts->add( 'wp-ajax-response', "/wp-includes/js/wp-ajax-response$suffix.js", array('jquery'), '20091119' );
+ $scripts->add_data( 'wp-ajax-response', 'group', 1 );
+ $scripts->localize( 'wp-ajax-response', 'wpAjax', array(
+ 'noPerm' => __('You do not have permission to do that.'),
+ 'broken' => __('An unidentified error has occurred.'),
+ 'l10n_print_after' => 'try{convertEntities(wpAjax);}catch(e){};'
+ ) );
+
+ $scripts->add( 'autosave', "/wp-includes/js/autosave$suffix.js", array('schedule', 'wp-ajax-response'), '20091012' );
+ $scripts->add_data( 'autosave', 'group', 1 );
+
+ $scripts->add( 'wp-lists', "/wp-includes/js/wp-lists$suffix.js", array('wp-ajax-response'), '20091128' );
+ $scripts->add_data( 'wp-lists', 'group', 1 );
+
+ $scripts->add( 'scriptaculous-root', '/wp-includes/js/scriptaculous/wp-scriptaculous.js', array('prototype'), '1.8.0');
+ $scripts->add( 'scriptaculous-builder', '/wp-includes/js/scriptaculous/builder.js', array('scriptaculous-root'), '1.8.0');
+ $scripts->add( 'scriptaculous-dragdrop', '/wp-includes/js/scriptaculous/dragdrop.js', array('scriptaculous-builder', 'scriptaculous-effects'), '1.8.0');
+ $scripts->add( 'scriptaculous-effects', '/wp-includes/js/scriptaculous/effects.js', array('scriptaculous-root'), '1.8.0');
+ $scripts->add( 'scriptaculous-slider', '/wp-includes/js/scriptaculous/slider.js', array('scriptaculous-effects'), '1.8.0');
+ $scripts->add( 'scriptaculous-sound', '/wp-includes/js/scriptaculous/sound.js', array( 'scriptaculous-root' ), '1.8.0' );
+ $scripts->add( 'scriptaculous-controls', '/wp-includes/js/scriptaculous/controls.js', array('scriptaculous-root'), '1.8.0');
+ $scripts->add( 'scriptaculous', '', array('scriptaculous-dragdrop', 'scriptaculous-slider', 'scriptaculous-controls'), '1.8.0');
+
+ // not used in core, replaced by Jcrop.js
+ $scripts->add( 'cropper', '/wp-includes/js/crop/cropper.js', array('scriptaculous-dragdrop'), '20070118');
+
+ $scripts->add( 'jquery', '/wp-includes/js/jquery/jquery.js', false, '1.3.2');
+
+ $scripts->add( 'jquery-ui-core', '/wp-includes/js/jquery/ui.core.js', array('jquery'), '1.7.1' );
+ $scripts->add_data( 'jquery-ui-core', 'group', 1 );
+
+ $scripts->add( 'jquery-ui-tabs', '/wp-includes/js/jquery/ui.tabs.js', array('jquery-ui-core'), '1.7.1' );
+ $scripts->add_data( 'jquery-ui-tabs', 'group', 1 );
+
+ $scripts->add( 'jquery-ui-sortable', '/wp-includes/js/jquery/ui.sortable.js', array('jquery-ui-core'), '1.7.1' );
+ $scripts->add_data( 'jquery-ui-sortable', 'group', 1 );
+
+ $scripts->add( 'jquery-ui-draggable', '/wp-includes/js/jquery/ui.draggable.js', array('jquery-ui-core'), '1.7.1' );
+ $scripts->add_data( 'jquery-ui-draggable', 'group', 1 );
+
+ $scripts->add( 'jquery-ui-droppable', '/wp-includes/js/jquery/ui.droppable.js', array('jquery-ui-core'), '1.7.1' );
+ $scripts->add_data( 'jquery-ui-droppable', 'group', 1 );
+
+ $scripts->add( 'jquery-ui-selectable', '/wp-includes/js/jquery/ui.selectable.js', array('jquery-ui-core'), '1.7.1' );
+ $scripts->add_data( 'jquery-ui-selectable', 'group', 1 );
+
+ $scripts->add( 'jquery-ui-resizable', '/wp-includes/js/jquery/ui.resizable.js', array('jquery-ui-core'), '1.7.1' );
+ $scripts->add_data( 'jquery-ui-resizable', 'group', 1 );
+
+ $scripts->add( 'jquery-ui-dialog', '/wp-includes/js/jquery/ui.dialog.js', array('jquery-ui-resizable', 'jquery-ui-draggable'), '1.7.1' );
+ $scripts->add_data( 'jquery-ui-dialog', 'group', 1 );
+
+ // deprecated, not used in core, most functionality is included in jQuery 1.3
+ $scripts->add( 'jquery-form', "/wp-includes/js/jquery/jquery.form$suffix.js", array('jquery'), '2.02m');
+ $scripts->add_data( 'jquery-form', 'group', 1 );
+
+ $scripts->add( 'jquery-color', "/wp-includes/js/jquery/jquery.color$suffix.js", array('jquery'), '2.0-4561m');
+ $scripts->add_data( 'jquery-color', 'group', 1 );
+
+ // deprecated, not used in core
+ $scripts->add( 'interface', '/wp-includes/js/jquery/interface.js', array('jquery'), '1.2' );
+
+ $scripts->add( 'suggest', "/wp-includes/js/jquery/suggest$suffix.js", array('jquery'), '1.1-20090125');
+ $scripts->add_data( 'suggest', 'group', 1 );
+
+ $scripts->add( 'schedule', '/wp-includes/js/jquery/jquery.schedule.js', array('jquery'), '20m');
+ $scripts->add_data( 'schedule', 'group', 1 );
+
+ $scripts->add( 'jquery-hotkeys', "/wp-includes/js/jquery/jquery.hotkeys$suffix.js", array('jquery'), '0.0.2m' );
+ $scripts->add_data( 'jquery-hotkeys', 'group', 1 );
+
+ $scripts->add( 'jquery-table-hotkeys', "/wp-includes/js/jquery/jquery.table-hotkeys$suffix.js", array('jquery', 'jquery-hotkeys'), '20090102' );
+ $scripts->add_data( 'jquery-table-hotkeys', 'group', 1 );
+
+ $scripts->add( 'thickbox', "/wp-includes/js/thickbox/thickbox.js", array('jquery'), '3.1-20091124');
+ $scripts->add_data( 'thickbox', 'group', 1 );
+ $scripts->localize( 'thickbox', 'thickboxL10n', array(
+ 'next' => __('Next >'),
+ 'prev' => __('< Prev'),
+ 'image' => __('Image'),
+ 'of' => __('of'),
+ 'close' => __('Close'),
+ 'l10n_print_after' => 'try{convertEntities(thickboxL10n);}catch(e){};'
+ ) );
+
+
+ $scripts->add( 'jcrop', "/wp-includes/js/jcrop/jquery.Jcrop$suffix.js", array('jquery'), '0.9.8');
+
+ $scripts->add( 'swfobject', "/wp-includes/js/swfobject.js", false, '2.1');
+
+ $scripts->add( 'swfupload', '/wp-includes/js/swfupload/swfupload.js', false, '2201');
+ $scripts->add( 'swfupload-swfobject', '/wp-includes/js/swfupload/plugins/swfupload.swfobject.js', array('swfupload', 'swfobject'), '2201');
+ $scripts->add( 'swfupload-queue', '/wp-includes/js/swfupload/plugins/swfupload.queue.js', array('swfupload'), '2201');
+ $scripts->add( 'swfupload-speed', '/wp-includes/js/swfupload/plugins/swfupload.speed.js', array('swfupload'), '2201');
+
+ if ( defined('SCRIPT_DEBUG') && SCRIPT_DEBUG ) {
+ // queue all SWFUpload scripts that are used by default
+ $scripts->add( 'swfupload-all', false, array('swfupload', 'swfupload-swfobject', 'swfupload-queue'), '2201');
+ } else {
+ $scripts->add( 'swfupload-all', '/wp-includes/js/swfupload/swfupload-all.js', array(), '2201');