mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-06-28 22:30:04 +00:00
New import system. Very rough draft.
git-svn-id: https://develop.svn.wordpress.org/trunk@2800 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
@@ -63,7 +63,33 @@ if (isset($_GET['page'])) {
|
||||
|
||||
include(ABSPATH . 'wp-admin/admin-footer.php');
|
||||
|
||||
exit();
|
||||
} else if (isset($_GET['import'])) {
|
||||
|
||||
$importer = $_GET['import'];
|
||||
|
||||
if ( validate_file($importer) ) {
|
||||
die(__('Invalid importer.'));
|
||||
}
|
||||
|
||||
if (! file_exists(ABSPATH . "wp-admin/import/$importer.php"))
|
||||
die(__('Cannot load importer.'));
|
||||
|
||||
include(ABSPATH . "wp-admin/import/$importer.php");
|
||||
|
||||
$parent_file = 'import.php';
|
||||
$title = __('Import');
|
||||
|
||||
if (! isset($_GET['noheader']))
|
||||
require_once(ABSPATH . 'wp-admin/admin-header.php');
|
||||
|
||||
require_once(ABSPATH . 'wp-admin/upgrade-functions.php');
|
||||
|
||||
call_user_func($wp_importers[$importer][2]);
|
||||
|
||||
include(ABSPATH . 'wp-admin/admin-footer.php');
|
||||
|
||||
exit();
|
||||
}
|
||||
|
||||
?>
|
||||
?>
|
||||
|
||||
Reference in New Issue
Block a user