Ticket #16024: 16024.2.diff
File 16024.2.diff, 1.5 KB (added by , 13 years ago) |
---|
-
wp-includes/class.wp-scripts.php
100 100 101 101 $src = $this->registered[$handle]->src; 102 102 103 if ( $this->do_concat ) {103 if ( $this->do_concat && ( !isset($this->registered[$handle]->extra['conditional']) || !$this->registered[$handle]->extra['conditional'] ) ) { 104 104 $srce = apply_filters( 'script_loader_src', $src, $handle ); 105 105 if ( $this->in_default_dir($srce) ) { 106 106 $this->print_code .= $this->print_scripts_l10n( $handle, false ); … … 122 122 $src = add_query_arg('ver', $ver, $src); 123 123 $src = esc_url(apply_filters( 'script_loader_src', $src, $handle )); 124 124 125 if ( $this->do_concat )125 if ( $this->do_concat && ( !isset($this->registered[$handle]->extra['conditional']) || !$this->registered[$handle]->extra['conditional'] ) ) { 126 126 $this->print_html .= "<script type='text/javascript' src='$src'></script>\n"; 127 else 128 echo "<script type='text/javascript' src='$src'></script>\n"; 127 } else { 128 $start_cond = $end_cond = ''; 129 if ( isset($this->registered[$handle]->extra['conditional']) && $this->registered[$handle]->extra['conditional'] ) { 130 $start_cond = "<!--[if {$this->registered[$handle]->extra['conditional']}]>\n"; 131 $end_cond = "<![endif]-->\n"; 132 } 133 echo "{$start_cond}<script type='text/javascript' src='$src'></script>\n{$end_cond}"; 134 } 129 135 130 136 return true; 131 137 }