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

git-svn-id: http://svn.automattic.com/wordpress/trunk@5935 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
ryan 2007-08-23 23:09:03 +00:00
parent 7c0ecf6202
commit 6db72e6e43
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';