Import cleanup and optimizations.

git-svn-id: http://svn.automattic.com/wordpress/trunk@5204 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
rob1n 2007-04-07 15:46:09 +00:00
parent e874adadaa
commit 88a90414bb
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);
}
}
}