Example #1
0
 /**
  * Returns the URL of the current module.
  *
  * Get's the full URL of the current module.
  *
  * @since 4.0.0
  *
  * @param string $file the module file from which to derive the path
  *
  * @return string the path of the current module
  */
 public static function get_module_path($file)
 {
     $path = str_replace(ITSEC_Core::get_plugin_dir(), '', dirname($file));
     $path = ltrim(str_replace('\\', '/', $path), '/');
     $url_base = trailingslashit(plugin_dir_url(ITSEC_Core::get_plugin_file()));
     return trailingslashit($url_base . $path);
 }