Make WordPress Core


Ignore:
Timestamp:
02/23/2009 08:47:49 AM (17 years ago)
Author:
azaozz
Message:

Fix typo and add some documentation to script_loader

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-includes/script-loader.php

    r10614 r10635  
    77 * plugins will only be concerned about the filters and actions set in this
    88 * 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 *
    1021 * @package WordPress
    1122 */
     
    3041 *
    3142 * Localizes a few of the scripts.
     43 * $scripts->add_data( 'script-handle', 'group', 1 ); queues the script for the footer
    3244 *
    3345 * @since 2.6.0
     
    4658
    4759    $suffix = defined('SCRIPT_DEBUG') && SCRIPT_DEBUG ? '.dev' : '';
    48 
    4960
    5061    $scripts->add( 'utils', "/wp-admin/js/utils$suffix.js", false, '20090102' );
     
    537548 */
    538549function print_head_scripts() {
     550    global $wp_scripts, $concatenate_scripts;
     551
    539552    if ( ! did_action('wp_print_scripts') )
    540553        do_action('wp_print_scripts');
    541 
    542     global $wp_scripts, $concatenate_scripts;
    543554
    544555    if ( !is_a($wp_scripts, 'WP_Scripts') )
     
    550561
    551562    if ( apply_filters('print_head_scripts', true) )
    552         _pring_scripts();
     563        _print_scripts();
    553564
    554565    $wp_scripts->reset();
     
    572583
    573584    if ( apply_filters('print_footer_scripts', true) )
    574         _pring_scripts();
     585        _print_scripts();
    575586
    576587    $wp_scripts->reset();
     
    578589}
    579590
    580 function _pring_scripts() {
     591function _print_scripts() {
    581592    global $wp_scripts, $compress_scripts;
    582593
Note: See TracChangeset for help on using the changeset viewer.