Ticket #13592: 13592.4.diff
File 13592.4.diff, 1.1 KB (added by , 10 years ago) |
---|
-
src/wp-includes/class.wp-scripts.php
135 135 /** This filter is documented in wp-includes/class.wp-scripts.php */ 136 136 $src = esc_url( apply_filters( 'script_loader_src', $src, $handle ) ); 137 137 138 if ( ! $src ) 138 if ( ! $src ) { 139 139 return true; 140 } 141 142 $script_tag = "<script type='text/javascript' src='%s'></script>\n"; 143 /** 144 * Filter the script tag. 145 * 146 * @since 4.1.0 147 * 148 * @param string $script_tag Script tag. 149 * @param string $src Source of script. 150 * @param string $handle Script handle. 151 */ 152 $script_tag = apply_filters( 'script_loader_tag', $script_tag, $src, $handle ); 153 154 $script = sprintf( $script_tag, $src ); 155 156 if ( $this->do_concat ) { 157 $this->print_html .= $script; 158 } else { 159 echo $script; 160 } 140 161 141 if ( $this->do_concat )142 $this->print_html .= "<script type='text/javascript' src='$src'></script>\n";143 else144 echo "<script type='text/javascript' src='$src'></script>\n";145 146 162 return true; 147 163 } 148 164