Ticket #9346: print-scripts-footer.diff
File print-scripts-footer.diff, 867 bytes (added by , 13 years ago) |
---|
-
wp-includes/functions.wp-scripts.php
101 101 if ( $src ) { 102 102 $_handle = explode('?', $handle); 103 103 $wp_scripts->add( $_handle[0], $src, $deps, $ver ); 104 if ( $in_footer ) 104 if ( $in_footer ) { 105 105 $wp_scripts->add_data( $_handle[0], 'group', 1 ); 106 107 // when the scripts are actually printed via WP_Scripts->do_item, the handles are added to 108 // in_footer[] if the have a group set. if wp_print_scripts has already beed called, do_item 109 // won't called on these items and so they won't be displayed in the footer 110 if (did_action('wp_print_scripts')) 111 $wp_scripts->in_footer[] = $_handle[0]; 112 } 106 113 } 107 114 $wp_scripts->enqueue( $handle ); 108 115 }