facetwp jetpack lazy load compat

djrmom

{{gist file=”custom-hooks.php” lang=”php”}}
<?php

/** reinitializing jetpack’s lazy load after facet loads **/
add_action( ‘wp_head’, function() {
?>
<script>
(function($) {
$(document).on(‘facetwp-loaded’, function() {
jetpackLazyImagesModule( $ );
});
})(jQuery);
</script>
<?php
}, 100 );
{{/gist}}