facetwp/loaded hook

djrmom

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

add_action( ‘wp_head’, function() {
?>
<script>
(function($) {
$(function() {
FWP.hooks.addAction(‘facetwp/loaded’, function() {
/* run code here after facetwp loaded, 100 below can be modified to set priority order */
}, 100 );
});
})(jQuery);
</script>
<?php
}, 100 );
{{/gist}}{{gist file=”facet.js” lang=”javascript”}}
(function($) {
$(function() {
FWP.hooks.addAction(‘facetwp/loaded’, function() {
/* run code here after facetwp loaded, 100 below can be modified to set priority order */
}, 100 );
});
})(jQuery);

{{/gist}}