OK, here is my scenario:
1. I have a user plugin.
2. In the plugin class I have a function that can be called in template files or codeblocks.
3. When the function is called, in order for it to work, I need to place scripts and css calls in the <head> (ideally).
Currently I have this in the "plugin".php, outside of the main function:
`zp_register_filter('theme_head','printJSwhatever...');`
which calls a function to print the necessary js/css calls in the <head>. But it makes this call ALWAYS, on every page when the plugin is activated. I am looking for the possibility to only print this when the main plugin function is called either by a template page or codeblock entry. Not an expert in php or zp plugin architecture, probably something simple....