Changeset 10367 for trunk/wp-includes/script-loader.php
- Timestamp:
- 01/15/2009 07:50:23 PM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-includes/script-loader.php
r10366 r10367 537 537 function wp_print_head_scripts() { 538 538 do_action( 'wp_print_scripts' ); 539 global $wp_scripts, $concatenate_scripts , $compress_scripts;539 global $wp_scripts, $concatenate_scripts; 540 540 541 541 if ( !is_a($wp_scripts, 'WP_Scripts') ) … … 548 548 $wp_scripts->do_head_items(); 549 549 550 _pring_scripts(); 550 if ( apply_filters('print_head_scripts', true) ) 551 _pring_scripts(); 551 552 552 553 $wp_scripts->do_concat = false; 554 $wp_scripts->print_code = $wp_scripts->concat = $wp_scripts->concat_version = $wp_scripts->print_html = $wp_scripts->src = ''; 553 555 return $wp_scripts->done; 554 556 } … … 571 573 $wp_scripts->do_footer_items(); 572 574 573 _pring_scripts(); 575 if ( apply_filters('print_footer_scripts', true) ) 576 _pring_scripts(); 574 577 575 578 $wp_scripts->do_concat = false; 579 $wp_scripts->concat = $wp_scripts->concat_version = $wp_scripts->print_code = $wp_scripts->print_html = $wp_scripts->src = ''; 576 580 return $wp_scripts->done; 577 581 } … … 590 594 echo "/* ]]> */\n"; 591 595 echo "</script>\n"; 592 $wp_scripts->print_code = '';593 596 } 594 597 595 $ver = md5( $wp_scripts->concat_version);596 $src = $wp_scripts->base_url . "/wp-admin/load-scripts.php?c={$zip}& load=" . rtrim($wp_scripts->concat, ',') . "&ver=$ver";598 $ver = md5("$wp_scripts->concat" . "$wp_scripts->concat_version"); 599 $src = $wp_scripts->base_url . "/wp-admin/load-scripts.php?c={$zip}&load=" . rtrim($wp_scripts->concat, ',') . "&ver=$ver"; 597 600 echo "<script type='text/javascript' src='$src'></script>\n"; 598 $wp_scripts->concat = $wp_scripts->concat_version = '';599 601 } 600 602 601 if ( !empty($wp_scripts->print_html) ) {603 if ( !empty($wp_scripts->print_html) ) 602 604 echo $wp_scripts->print_html; 603 $wp_scripts->print_html = ''; 604 } 605 605 606 } 606 607 … … 619 620 $wp_styles->do_items(false); 620 621 621 if ( !empty($wp_styles->concat) ) { 622 $ver = md5($wp_styles->concat_version); 623 $rtl = 'rtl' === $wp_styles->text_direction ? 1 : 0; 624 $href = $wp_styles->base_url . "/wp-admin/load-styles.php?c={$zip}&rtl={$rtl}&load=" . rtrim($wp_styles->concat, ',') . "&ver=$ver"; 625 echo "<link rel='stylesheet' href='$href' type='text/css' media='all' />\n"; 626 $wp_styles->concat = $wp_styles->concat_version = ''; 622 if ( apply_filters('print_admin_styles', true) ) { 623 if ( !empty($wp_styles->concat) ) { 624 $ver = md5("$wp_styles->concat" . "$wp_styles->concat_version"); 625 $rtl = 'rtl' === $wp_styles->text_direction ? 1 : 0; 626 $href = $wp_styles->base_url . "/wp-admin/load-styles.php?c={$zip}&rtl={$rtl}&load=" . rtrim($wp_styles->concat, ',') . "&ver=$ver"; 627 echo "<link rel='stylesheet' href='$href' type='text/css' media='all' />\n"; 628 } 629 630 if ( !empty($wp_styles->print_html) ) 631 echo $wp_styles->print_html; 627 632 } 628 633 629 if ( !empty($wp_styles->print_html) ) {630 echo $wp_styles->print_html;631 $wp_styles->print_html = '';632 }633 634 634 $wp_styles->do_concat = false; 635 $wp_styles->concat = $wp_styles->concat_version = $wp_styles->print_html = ''; 635 636 return $wp_styles->done; 636 637 }
Note: See TracChangeset
for help on using the changeset viewer.