classes/autoptimizeScripts.php 1 location
|
@@ 362-370 (lines=9) @@
|
359 |
|
} else { |
360 |
|
$this->move['first'][] = $new_tag; |
361 |
|
} |
362 |
|
} else { |
363 |
|
// cannot be moved, so if flag was added re-inject altered tag immediately. |
364 |
|
if ( ( '' !== $new_tag && $orig_tag !== $new_tag ) || ( '' === $new_tag && apply_filters( 'autoptimize_filter_js_remove_empty_files', false ) ) ) { |
365 |
|
$this->content = str_replace( $orig_tag, $new_tag, $this->content ); |
366 |
|
$orig_tag = ''; |
367 |
|
} |
368 |
|
// and forget about the $tag (not to be touched any more). |
369 |
|
$tag = ''; |
370 |
|
} |
371 |
|
} |
372 |
|
} else { |
373 |
|
// Inline script. |
classes/autoptimizeStyles.php 1 location
|
@@ 359-361 (lines=3) @@
|
356 |
|
} |
357 |
|
|
358 |
|
// And replace! |
359 |
|
if ( ( '' !== $new_tag && $new_tag !== $tag ) || ( '' === $new_tag && apply_filters( 'autoptimize_filter_css_remove_empty_files', false ) ) ) { |
360 |
|
$this->content = str_replace( $tag, $new_tag, $this->content ); |
361 |
|
} |
362 |
|
} |
363 |
|
} |
364 |
|
} |