/** * * Create url for the specified file. The file must be specified in relative path * to the base of the plugin */ protected function createUrl($file) { //get the real file path $file = realpath($file); //calculate the relative path from this file $file = SyC::relativepath(dirname(__FILE__), $file); //append the relative path to the current file's URL return WP_PLUGIN_URL . '/' . str_replace(basename(__FILE__), "", plugin_basename(__FILE__)) . $file; }