Changeset 55669
- Timestamp:
- 04/21/2023 03:11:46 AM (18 months ago)
- Location:
- trunk
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/script-loader.php
r55658 r55669 2945 2945 list( , $prefix, $url ) = $matches; 2946 2946 2947 if ( ! ( 2948 str_starts_with( $url, 'http:' ) 2949 || 2950 str_starts_with( $url, 'https:' ) 2951 || 2952 str_starts_with( $url, '//' ) 2953 || 2954 str_starts_with( $url, '#' ) 2955 || 2947 // Short-circuit if the URL does not require normalization. 2948 if ( 2949 str_starts_with( $url, 'http:' ) || 2950 str_starts_with( $url, 'https:' ) || 2951 str_starts_with( $url, '//' ) || 2952 str_starts_with( $url, '#' ) || 2956 2953 str_starts_with( $url, 'data:' ) 2957 ) ) { 2958 // Build the absolute URL. 2959 $absolute_url = dirname( $stylesheet_url ) . '/' . $url; 2960 $absolute_url = str_replace( '/./', '/', $absolute_url ); 2961 2962 // Convert to URL related to the site root. 2963 $url = wp_make_link_relative( $absolute_url ); 2954 ) { 2955 return $matches[0]; 2964 2956 } 2957 2958 // Build the absolute URL. 2959 $absolute_url = dirname( $stylesheet_url ) . '/' . $url; 2960 $absolute_url = str_replace( '/./', '/', $absolute_url ); 2961 2962 // Convert to URL related to the site root. 2963 $url = wp_make_link_relative( $absolute_url ); 2965 2964 2966 2965 return $prefix . $url; -
trunk/tests/phpunit/tests/dependencies/styles.php
r55658 r55669 197 197 * @ticket 54243 198 198 * @ticket 54922 199 * @ticket 58069 199 200 * 200 201 * @covers ::_wp_normalize_relative_css_links
Note: See TracChangeset
for help on using the changeset viewer.