Ok, try Tippy http://ww.wp.xz.cn/extend/plugins/tippy/ lovely plugin.
It works like this out of the box:
1. 1 JS and 1 CSS file in head
2. Init snippet based on settings below them, and especially JS file!
With Better Minify this order is kept if nothing is touched but just moving “Tippy” to footer will render snippet useless as it depends on main file to be loaded before.
This might be obvious but lets say I do it manually like this
add_filter('bwp_minify_allowed_scripts', 'my_allowed_scripts');
function my_allowed_scripts() {
return array(
'Tippy' // manually placed in footer
);
return;
}
And since I know snippet from plugin now wont work I move that too:
/* - [ TIPPY FIX ] - */
remove_action('wp_head', 'tippy_load_settings');
add_action('wp_footer', 'tippy_load_settings_new', 120); // 120 so it comes after BWP
function tippy_load_settings_new() {
if (get_option('tippy_fadeTip', 'fade') == "fade")
{
$tippyFadeRate = 300;
} else {
$tippyFadeRate = 0;
}
echo '
<script type="text/javascript">
Tippy.initialize({
blah, blah
});
</script>
';
}
Then it will STILL come before BWP bundle because you fire that off with a priority of 100, hence the added 120.
From class-bwp-minify.php
add_action('wp_footer', array($this, 'print_footer_scripts'), 100);
So that 100 number could be nifty to manipulate 🙂 More so because not all plugins allow this fiddling so not really anything to do other than changing number manually.
Or is there any action hook that will always come after “wp_footer”?
Not worlds biggest problem and may be nothing to do but if you have mentioned how a JS file can be tied to initialization snippets in FAQ I think you should. If not BWP will be blamed, that is guranteed 🙂