post_content; // only call them if the post includes the tag if (stristr($content,'eclipse-crossword url=')) { $plugin_name = dirname(plugin_basename(__FILE__)); wp_enqueue_style('eclipse-crossword', plugins_url($plugin_name.'/includes/eci.css')); wp_enqueue_script('eclipse-crossword', plugins_url($plugin_name.'/includes/eci.js')); } } // *************************************************************** // ****** START FUNCTION: ECI_SHORTCODE - ADD CROSSWORD ****** function eci_shortcode($params) { $values = shortcode_atts(array('url' => ''), $params); $body = ''; if ($values['url'] != ''){ // in separate file so it's not loaded into memory unless necessary require_once('eclipse-crossword-shortcode.php'); } return $body; } // *********************************************************** ?>