Changeset 60920 for trunk/src/wp-includes/class-wp-styles.php
- Timestamp:
- 10/10/2025 04:17:22 AM (2 months ago)
- File:
-
- 1 edited
-
trunk/src/wp-includes/class-wp-styles.php (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/class-wp-styles.php
r60719 r60920 334 334 $output = $this->get_data( $handle, 'after' ); 335 335 336 if ( empty( $output ) ) {336 if ( empty( $output ) || ! is_array( $output ) ) { 337 337 return false; 338 338 } 339 339 340 340 if ( ! $this->do_concat ) { 341 342 // Obtain the original `src` for a stylesheet possibly inlined by wp_maybe_inline_styles(). 343 $inlined_src = $this->get_data( $handle, 'inlined_src' ); 344 345 // If there's only one `after` inline style, and that inline style had been inlined, then use the $inlined_src 346 // as the sourceURL. Otherwise, if there is more than one inline `after` style associated with the handle, 347 // then resort to using the handle to construct the sourceURL since there isn't a single source. 348 if ( count( $output ) === 1 && is_string( $inlined_src ) && strlen( $inlined_src ) > 0 ) { 349 $source_url = esc_url_raw( $inlined_src ); 350 } else { 351 $source_url = rawurlencode( "{$handle}-inline-css" ); 352 } 353 341 354 $output[] = sprintf( 342 355 '/*# sourceURL=%s */', 343 rawurlencode( "{$handle}-inline-css" )356 $source_url 344 357 ); 345 358 }
Note: See TracChangeset
for help on using the changeset viewer.