Check for the wp-admin/imports folder before we open it so we don't show notices when it isn't there.
git-svn-id: https://develop.svn.wordpress.org/trunk@16996 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
4db50ee643
commit
103a31e361
|
@ -59,7 +59,9 @@ $parent_file = 'tools.php';
|
||||||
// Load all importers so that they can register.
|
// Load all importers so that they can register.
|
||||||
$import_loc = 'wp-admin/import';
|
$import_loc = 'wp-admin/import';
|
||||||
$import_root = ABSPATH . $import_loc;
|
$import_root = ABSPATH . $import_loc;
|
||||||
$imports_dir = @ opendir($import_root);
|
|
||||||
|
if ( file_exists( $import_root ) ) {
|
||||||
|
$imports_dir = opendir($import_root);
|
||||||
if ($imports_dir) {
|
if ($imports_dir) {
|
||||||
while (($file = readdir($imports_dir)) !== false) {
|
while (($file = readdir($imports_dir)) !== false) {
|
||||||
if ($file[0] == '.') {
|
if ($file[0] == '.') {
|
||||||
|
@ -69,7 +71,8 @@ if ($imports_dir) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@closedir($imports_dir);
|
closedir( $imports_dir );
|
||||||
|
}
|
||||||
|
|
||||||
$importers = get_importers();
|
$importers = get_importers();
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue