WordPress.org

Codex

Interested in functions, hooks, classes, or methods? Check out the new WordPress Code Reference!

Function Reference/export wp

Description

Generates a WXR export file for download.

Usage

 <?php
   $args = array( 
               'content'    => 'all',
               'author'     => false,
               'category'   => false,
               'start_date' => false,
               'end_date'   => false,
               'status'     => false,
   );
   export_wp( $args );
 ?>

Parameters

$args
(array) (required)
Default: None

Arguments

content
(string) (optional) A registered post type.
Default: 'all'
author
(string) (optional) author
Default: 'false'
category
(string) (optional) category
Default: 'false'
start_date
(date) (optional) start-date
Default: 'false'
end_date
(date) (optional) end-date
Default: 'false'
status
(string) (optional) status
Default: 'false'

Return Values

Notes

Requires including /wp-admin/includes/export.php if being used in a plugin. Example:

require_once( ABSPATH . 'wp-admin/includes/export.php' );

Change Log

Source File

export_wp() is located in wp-admin/includes/export.php

Related

This page is marked as incomplete. You can help Codex by expanding it.