]> scripts.mit.edu Git - autoinstalls/wordpress.git/blobdiff - wp-admin/import/rss.php
Wordpress 2.7.1-scripts
[autoinstalls/wordpress.git] / wp-admin / import / rss.php
index 60a449007bb20a8d30aa838e0ad43899c69801ce..832396f50efeed1c08b48f597e210241acfaafb0 100644 (file)
@@ -1,5 +1,20 @@
 <?php
-
+/**
+ * RSS Importer
+ *
+ * @package WordPress
+ * @subpackage Importer
+ */
+
+/**
+ * RSS Importer
+ *
+ * Will process a RSS feed for importing posts into WordPress. This is a very
+ * limited importer and should only be used as the last resort, when no other
+ * importer is available.
+ *
+ * @since unknown
+ */
 class RSS_Import {
 
        var $posts = array ();
@@ -7,6 +22,7 @@ class RSS_Import {
 
        function header() {
                echo '<div class="wrap">';
+               screen_icon();
                echo '<h2>'.__('Import RSS').'</h2>';
        }
 
@@ -87,7 +103,7 @@ class RSS_Import {
                        }
 
                        // Clean up content
-                       $post_content = preg_replace('|<(/?[A-Z]+)|e', "'<' . strtolower('$1')", $post_content);
+                       $post_content = preg_replace_callback('|<(/?[A-Z]+)|', create_function('$match', 'return "<" . strtolower($match[1]);'), $post_content);
                        $post_content = str_replace('<br>', '<br />', $post_content);
                        $post_content = str_replace('<hr>', '<hr />', $post_content);