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:
parent
1941794a98
commit
71252f8eac
@ -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…
x
Reference in New Issue
Block a user