Changeset 38253
- Timestamp:
- 08/13/2016 05:42:05 PM (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-admin/includes/export.php
r38024 r38253 19 19 * Generates the WXR export file for download. 20 20 * 21 * Default behavior is to export all content, however, note that post content will only 22 * be exported for post types with the `can_export` argument enabled. Any posts with the 23 * 'auto-draft' status will be skipped. 24 * 21 25 * @since 2.1.0 22 26 * 23 * @global wpdb $wpdb 24 * @global WP_Post $post 25 * 26 * @param array $args Filters defining what should be included in the export. 27 * @global wpdb $wpdb WordPress database abstraction object. 28 * @global WP_Post $post Global `$post`. 29 * 30 * @param array $args { 31 * Optional. Arguments for generating the WXR export file for download. Default empty array. 32 * 33 * @type string $content Type of content to export. If set, only the post content of this post type 34 * will be exported. Accepts 'all', 'post', 'page', 'attachment', or a defined 35 * custom post If an invalid custom post type is supplied, every post type for 36 * which `can_export` is enabled will be exported instead. If a valid custom post 37 * type is supplied but `can_export` is disabled, then 'posts' will be exported 38 * instead. When 'all' is supplied, only post types with `can_export` enabled will 39 * be exported. Default 'all'. 40 * @type string $author Author to export content for. Only used when `$content` is 'post', 'page', or 41 * 'attachment'. Accepts false (all) or a specific author ID. Default false (all). 42 * @type string $category Category (slug) to export content for. Used only when `$content` is 'post'. If 43 * set, only post content assigned to `$category will be exported. Accepts false 44 * or a specific category slug. Default is false (all categories). 45 * @type string $start_date Start date to export content from. Expected date format is 'Y-m-d'. Used only 46 * when `$content` is 'post', 'page' or 'attachment'. Default false (since the 47 * beginning of time). 48 * @type string $end_date End date to export content to. Expected date format is 'Y-m-d'. Used only when 49 * `$content` is 'post', 'page' or 'attachment'. Default false (latest publish date). 50 * @type string $status Post status to export posts for. Used only when `$content` is 'post' or 'page'. 51 * Accepts false (all statuses except 'auto-draft'), or a specific status, i.e. 52 * 'publish', 'pending', 'draft', 'auto-draft', 'future', 'private', 'inherit', or 53 * 'trash'. Default false (all statuses except 'auto-draft'). 54 * } 27 55 */ 28 56 function export_wp( $args = array() ) {
Note: See TracChangeset
for help on using the changeset viewer.