I’ve just faced a message from a reviewer I haven’t seen before:
Please enqueue scripts with proper hooks and not within the templates, use functions.php or non-templates instead. http://envato.d.pr/grEhYl/2Nu4Yjom
These two lines are located in a .php file with blog related functions and I’m not really sure what is this about? I’m registering all these scripts in the theme’s functions.php file with a proper hook for the “wp_enqueue_scripts” action. I do not enqueue them directly in the functions.php file because that particular script is being used only for very specific blog post types so there is no reason to keep it loaded all the time. Isn’t it the purpose of the register_script and enqueue_script functions division?
Edit: Well, I think I found it. I didn’t realise that that bit of a code was indeed repeated in one of the theme’s template files. Hopefully that’s it!