|
@@ 483-489 (lines=7) @@
|
| 480 |
|
*/ |
| 481 |
|
|
| 482 |
|
// Do CDN replacement if needed. |
| 483 |
|
if ( ! empty( $this->cdn_url ) ) { |
| 484 |
|
$replacement_url = $this->url_replace_cdn( $url ); |
| 485 |
|
// Prepare replacements array. |
| 486 |
|
$replacements[ $url_src_matches[1][ $count ] ] = str_replace( |
| 487 |
|
$original_url, $replacement_url, $url_src_matches[1][$count] |
| 488 |
|
); |
| 489 |
|
} |
| 490 |
|
} |
| 491 |
|
} |
| 492 |
|
|
|
@@ 603-609 (lines=7) @@
|
| 600 |
|
* inlining isn't turned on, or if a resource is skipped from |
| 601 |
|
* being inlined for whatever reason above. |
| 602 |
|
*/ |
| 603 |
|
if ( ! $inlined && ( ! empty( $this->cdn_url ) || has_filter( 'autoptimize_filter_base_replace_cdn' ) ) ) { |
| 604 |
|
// Just do the "simple" CDN replacement. |
| 605 |
|
$replacement_url = $this->url_replace_cdn( $url ); |
| 606 |
|
$imgreplace[ $url_src_matches[1][ $count ] ] = str_replace( |
| 607 |
|
$original_url, $replacement_url, $url_src_matches[1][$count] |
| 608 |
|
); |
| 609 |
|
} |
| 610 |
|
} |
| 611 |
|
} |
| 612 |
|
|