require_once( ABSPATH . 'wp-admin/includes/import.php' );
// Load our importers
$importers = apply_filters( 'bbp_importers', array( 'bbpress' ) );
// Loop through included importers
foreach ( $importers as $importer ) {
// Allow custom importer directory
$import_dir = apply_filters( 'bbp_importer_path', $this->admin_dir . 'importers', $importer );
// Compile the importer path
$import_file = trailingslashit( $import_dir ) . $importer . '.php';
// If the file exists, include it
if ( file_exists( $import_file ) ) {
require( $import_file );
}
}