Changeset 10635 for trunk/wp-includes/script-loader.php
- Timestamp:
- 02/23/2009 08:47:49 AM (17 years ago)
- File:
-
- 1 edited
-
trunk/wp-includes/script-loader.php (modified) (7 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-includes/script-loader.php
r10614 r10635 7 7 * plugins will only be concerned about the filters and actions set in this 8 8 * file. 9 * 9 * 10 * Several constants are used to manage the loading, concatenating and compression of scripts and CSS: 11 * define('SCRIPT_DEBUG', true); loads the develppment (non-minified) versions of all scripts 12 * define('CONCATENATE_SCRIPTS', false); disables both compression and cancatenating, 13 * define('COMPRESS_SCRIPTS', false); disables compression of scripts, 14 * define('COMPRESS_CSS', false); disables compression of CSS, 15 * define('ENFORCE_GZIP', true); forces gzip for compression (default is deflate). 16 * 17 * The globals $concatenate_scripts, $compress_scripts and $compress_css can be set by plugins 18 * to temporarily override the above settings. Also a compression test is run once and the result is saved 19 * as option 'can_compress_scripts' (0/1). The test will run again if that option is deleted. 20 * 10 21 * @package WordPress 11 22 */ … … 30 41 * 31 42 * Localizes a few of the scripts. 43 * $scripts->add_data( 'script-handle', 'group', 1 ); queues the script for the footer 32 44 * 33 45 * @since 2.6.0 … … 46 58 47 59 $suffix = defined('SCRIPT_DEBUG') && SCRIPT_DEBUG ? '.dev' : ''; 48 49 60 50 61 $scripts->add( 'utils', "/wp-admin/js/utils$suffix.js", false, '20090102' ); … … 537 548 */ 538 549 function print_head_scripts() { 550 global $wp_scripts, $concatenate_scripts; 551 539 552 if ( ! did_action('wp_print_scripts') ) 540 553 do_action('wp_print_scripts'); 541 542 global $wp_scripts, $concatenate_scripts;543 554 544 555 if ( !is_a($wp_scripts, 'WP_Scripts') ) … … 550 561 551 562 if ( apply_filters('print_head_scripts', true) ) 552 _prin g_scripts();563 _print_scripts(); 553 564 554 565 $wp_scripts->reset(); … … 572 583 573 584 if ( apply_filters('print_footer_scripts', true) ) 574 _prin g_scripts();585 _print_scripts(); 575 586 576 587 $wp_scripts->reset(); … … 578 589 } 579 590 580 function _prin g_scripts() {591 function _print_scripts() { 581 592 global $wp_scripts, $compress_scripts; 582 593
Note: See TracChangeset
for help on using the changeset viewer.