WordPress.org

Make WordPress Core

Changeset 5935


Ignore:
Timestamp:
08/23/2007 11:09:03 PM (11 years ago)
Author:
ryan
Message:

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

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-admin/admin.php

    r5820 r5935  
    7878    }
    7979
    80     if (! file_exists(ABSPATH . "wp-admin/import/$importer.php"))
    81         wp_die(__('Cannot load importer.'));
    82 
    83     include(ABSPATH . "wp-admin/import/$importer.php");
     80    // Allow plugins to define importers as well
     81    if (! function_exists($wp_importers[$importer][2]))
     82    {
     83        if (! file_exists(ABSPATH . "wp-admin/import/$importer.php"))
     84        {
     85            wp_die(__('Cannot load importer.'));
     86        }
     87        include(ABSPATH . "wp-admin/import/$importer.php");
     88    }
    8489
    8590    $parent_file = 'edit.php';
Note: See TracChangeset for help on using the changeset viewer.