-
-
Save Shoora/d3f39a540475562cdaa99a2343ba7fae to your computer and use it in GitHub Desktop.
Исправление lazyload Autoptimize
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
add_filter('autoptimize_filter_imgopt_lazyload_cssoutput', function($string) { | |
ob_start(); | |
?> | |
<script>document.getElementsByTagName("head")[0].insertAdjacentHTML("beforeend","<?= $string ?>");</script> | |
<?php | |
return ob_get_clean(); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment