Generates a WXR export file for download.
<?php
$args = array(
'content' => 'all',
'author' => false,
'category' => false,
'start_date' => false,
'end_date' => false,
'status' => false,
);
export_wp( $args );
?>
Requires including /wp-admin/includes/export.php if being used in a plugin. Example:
require_once( ABSPATH . 'wp-admin/includes/export.php' );
export_wp() is located in wp-admin/includes/export.php