Import cleanup and optimizations.
git-svn-id: http://svn.automattic.com/wordpress/trunk@5204 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
e874adadaa
commit
88a90414bb
|
@ -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);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue