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:
parent
7c0ecf6202
commit
6db72e6e43
|
@ -77,10 +77,15 @@ if (isset($plugin_page)) {
|
||||||
wp_die(__('Invalid importer.'));
|
wp_die(__('Invalid importer.'));
|
||||||
}
|
}
|
||||||
|
|
||||||
if (! file_exists(ABSPATH . "wp-admin/import/$importer.php"))
|
// Allow plugins to define importers as well
|
||||||
wp_die(__('Cannot load importer.'));
|
if (! function_exists($wp_importers[$importer][2]))
|
||||||
|
{
|
||||||
include(ABSPATH . "wp-admin/import/$importer.php");
|
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';
|
$parent_file = 'edit.php';
|
||||||
$submenu_file = 'import.php';
|
$submenu_file = 'import.php';
|
||||||
|
|
Loading…
Reference in New Issue