Beispiel #1
0
 public static function standard_dir($dir, $path_replace = null)
 {
     $dir = wp_normalize_path($dir);
     if (is_string($path_replace)) {
         if (!self::$abspath) {
             self::$abspath = wp_normalize_path(ABSPATH);
             self::$contentpath = wp_normalize_path(dirname(WP_CONTENT_DIR) . '/');
         }
         $dir = str_replace(array(self::$abspath, self::$contentpath), $path_replace, $dir);
     }
     return $dir;
 }