Allow plugins to register importers. Props westi and Nazgul. fixes #4614

git-svn-id: https://develop.svn.wordpress.org/trunk@5935 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Ryan Boren 2007-08-23 23:09:03 +00:00
parent 1941794a98
commit 71252f8eac
1 changed files with 9 additions and 4 deletions

View File

@ -77,10 +77,15 @@ if (isset($plugin_page)) {
wp_die(__('Invalid importer.'));
}
if (! file_exists(ABSPATH . "wp-admin/import/$importer.php"))
wp_die(__('Cannot load importer.'));
include(ABSPATH . "wp-admin/import/$importer.php");
// Allow plugins to define importers as well
if (! function_exists($wp_importers[$importer][2]))
{
if (! file_exists(ABSPATH . "wp-admin/import/$importer.php"))
{
wp_die(__('Cannot load importer.'));
}
include(ABSPATH . "wp-admin/import/$importer.php");
}
$parent_file = 'edit.php';
$submenu_file = 'import.php';