Changeset 43960
- Timestamp:
- 12/04/2018 02:10:44 AM (6 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/5.0/src/wp-includes/script-loader.php
r43955 r43960 179 179 } 180 180 181 $src = $scripts->registered[ $handle ]->src; 182 $ver = $scripts->registered[ $handle ]->ver; 183 184 if ( ! preg_match( '|^(https?:)?//|', $src ) && ! ( $scripts->content_url && 0 === strpos( $src, $scripts->content_url ) ) ) { 185 $src = $scripts->base_url . $src; 186 } 187 188 if ( ! empty( $ver ) ) { 189 $src = add_query_arg( 'ver', $ver, $src ); 190 } 191 192 /** This filter is documented in wp-includes/class.wp-scripts.php */ 193 $src = esc_url( apply_filters( 'script_loader_src', $src, $handle ) ); 194 195 if ( ! $src ) { 196 continue; 197 } 198 181 199 $polyfill .= ( 182 200 // Test presence of feature... … … 186 204 // blocking write is exactly the behavior we need though. 187 205 'document.write( \'<script src="' . 188 esc_url( $scripts->registered[ $handle ]->src ).206 $src . 189 207 '"></scr\' + \'ipt>\' );' 190 208 );
Note: See TracChangeset
for help on using the changeset viewer.