'; echo '
'.__('Howdy! Upload your WordPress eXtended RSS (WXR) file and we’ll import the posts, comments, custom fields, and categories into this blog.').'
'; echo ''.__('Choose a WordPress WXR file to upload, then click Upload file and import.').'
'; wp_import_upload_form("admin.php?import=wordpress&step=1"); echo 'admins entries.'); ?>
get_wp_authors(); echo ' '; echo ''; } function select_authors() { $file = wp_import_handle_upload(); if ( isset($file['error']) ) { echo ''.__('Sorry, there has been an error.').'
'; echo '' . $file['error'] . '
'; return; } $this->file = $file['file']; $this->id = (int) $file['id']; $this->get_entries(); $this->wp_authors_form(); } function process_categories() { global $wpdb; $cat_names = (array) $wpdb->get_col("SELECT cat_name FROM $wpdb->categories"); while ( $c = array_shift($this->categories) ) { $cat_name = trim(str_replace(array (''), '', $this->get_tag( $c, 'wp:cat_name' ))); // If the category exists we leave it alone if ( in_array($cat_name, $cat_names) ) continue; $category_nicename = $this->get_tag( $c, 'wp:category_nicename' ); $posts_private = (int) $this->get_tag( $c, 'wp:posts_private' ); $links_private = (int) $this->get_tag( $c, 'wp:links_private' ); $parent = $this->get_tag( $c, 'wp:category_parent' ); if ( empty($parent) ) $category_parent = '0'; else $category_parent = category_exists($parent); $catarr = compact('category_nicename', 'category_parent', 'posts_private', 'links_private', 'posts_private', 'cat_name'); $cat_ID = wp_insert_category($catarr); } } function process_posts() { global $wpdb; $i = -1; echo '