X-Git-Url: https://scripts.mit.edu/gitweb/autoinstalls/wordpress.git/blobdiff_plain/3e7fab96d7874067884348df10bbdcdefa4a89ad..e0feb3b2e5b436a06bbb04fbc838d1cd6ec95399:/wp-admin/export.php
diff --git a/wp-admin/export.php b/wp-admin/export.php
index eab8044d..ce5081ba 100644
--- a/wp-admin/export.php
+++ b/wp-admin/export.php
@@ -1,272 +1,242 @@
+if ( !current_user_can('export') )
+ wp_die(__('You do not have sufficient permissions to export the content of this site.'));
-
-
-
-
-
-
-
-
-
+/** Load WordPress export API */
+require_once( ABSPATH . 'wp-admin/includes/export.php' );
+$title = __('Export');
+/**
+ * Display JavaScript on the page.
+ *
+ * @since 3.5.0
+ */
+function export_add_js() {
+?>
+
get_col("SELECT ID FROM $wpdb->posts $where ORDER BY post_date_gmt ASC");
-
-$categories = (array) get_categories('get=all');
-$tags = (array) get_tags('get=all');
-
-function wxr_missing_parents($categories) {
- if ( !is_array($categories) || empty($categories) )
- return array();
-
- foreach ( $categories as $category )
- $parents[$category->term_id] = $category->parent;
-
- $parents = array_unique(array_diff($parents, array_keys($parents)));
-
- if ( $zero = array_search('0', $parents) )
- unset($parents[$zero]);
-
- return $parents;
-}
-
-while ( $parents = wxr_missing_parents($categories) ) {
- $found_parents = get_categories("include=" . join(', ', $parents));
- if ( is_array($found_parents) && count($found_parents) )
- $categories = array_merge($categories, $found_parents);
- else
- break;
}
-
-// Put them in order to be inserted with no child going before its parent
-$pass = 0;
-$passes = 1000 + count($categories);
-while ( ( $cat = array_shift($categories) ) && ++$pass < $passes ) {
- if ( $cat->parent == 0 || isset($cats[$cat->parent]) ) {
- $cats[$cat->term_id] = $cat;
+add_action( 'admin_head', 'export_add_js' );
+
+get_current_screen()->add_help_tab( array(
+ 'id' => 'overview',
+ 'title' => __('Overview'),
+ 'content' => '
' . __('You can export a file of your site’s content in order to import it into another installation or platform. The export file will be an XML file format called WXR. Posts, pages, comments, custom fields, categories, and tags can be included. You can choose for the WXR file to include only certain posts or pages by setting the dropdown filters to limit the export by category, author, date range by month, or publishing status.') . '
' .
+ '
' . __('Once generated, your WXR file can be imported by another WordPress site or by another blogging platform able to access this format.') . '