Import cleanup and optimizations.

git-svn-id: https://develop.svn.wordpress.org/trunk@5204 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
rob1n 2007-04-07 15:46:09 +00:00
parent 143c7eb4c1
commit 0a98870027
1 changed files with 4 additions and 3 deletions

View File

@ -17,10 +17,11 @@ $import_root = ABSPATH.$import_loc;
$imports_dir = @ dir($import_root);
if ($imports_dir) {
while (($file = $imports_dir->read()) !== false) {
if (preg_match('|^\.+$|', $file))
if ($file{0} == '.') {
continue;
if (preg_match('|\.php$|', $file))
require_once("$import_root/$file");
} elseif (substr($file, -4) == '.php') {
require_once($import_root . '/' . $file);
}
}
}