Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save shubham-99fusion/319aed3ec9c30299090beee6bf652a2e to your computer and use it in GitHub Desktop.
Save shubham-99fusion/319aed3ec9c30299090beee6bf652a2e to your computer and use it in GitHub Desktop.
add_action('wp_enqueue_scripts',function(){
?>
<script>
document.addEventListener('unit_loaded',function(){
document.querySelectorAll('.flowplayer').forEach(function(element){
flowplayer(element,JSON.parse(element.getAttribute('data-item')));
})
});
</script>
<?php
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment