"my-script", "url" =>"my-script.js","dependencies" =>"jquery"), $atts); act_var_store("name",$atts['name'], "write"); act_var_store("url",$atts['url'], "write"); act_var_store("dependencies",$atts['dependencies'], "write"); // actual shortcode handling here } add_shortcode('scriptact', 'my_shortcode_handler'); //is called the function witch includes the scripts function print_my_script() { if ( ! act_var_store("counter") ) return; wp_register_script(act_var_store("name"), plugins_url(act_var_store("url") , __FILE__), array(act_var_store("dependencies")),"1.0", true); wp_print_scripts(act_var_store("name",$atts['name'])); } add_action('wp_footer', 'print_my_script');