Import cleanup and optimizations.
git-svn-id: https://develop.svn.wordpress.org/trunk@5204 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
143c7eb4c1
commit
0a98870027
@ -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
Block a user