Ticket #7061: wordpress-7061-import_description_as_excerpt.diff
| File wordpress-7061-import_description_as_excerpt.diff, 1.1 KB (added by koke, 5 years ago) |
|---|
-
wp-admin/import/rss.php
84 84 // This is for feeds that put content in description 85 85 preg_match('|<description>(.*?)</description>|is', $post, $post_content); 86 86 $post_content = $wpdb->escape($this->unhtmlentities(trim($post_content[1]))); 87 } else { 88 // This is for feeds that put content in description 89 preg_match('|<description>(.*?)</description>|is', $post, $post_excerpt); 90 $post_excerpt = $wpdb->escape($this->unhtmlentities(trim($post_excerpt[1]))); 87 91 } 88 92 89 93 // Clean up content … … 93 97 94 98 $post_author = 1; 95 99 $post_status = 'publish'; 96 $this->posts[$index] = compact('post_author', 'post_date', 'post_date_gmt', 'post_content', 'post_ title', 'post_status', 'guid', 'categories');100 $this->posts[$index] = compact('post_author', 'post_date', 'post_date_gmt', 'post_content', 'post_excerpt', 'post_title', 'post_status', 'guid', 'categories'); 97 101 $index++; 98 102 } 99 103 }