[wp-trac] [WordPress Trac] #5555: Post Excerpts not included in
import/export
WordPress Trac
wp-trac at lists.automattic.com
Mon Dec 31 14:42:51 GMT 2007
#5555: Post Excerpts not included in import/export
-----------------------------+----------------------------------------------
Reporter: intricateartist | Owner: anonymous
Type: defect | Status: new
Priority: normal | Milestone: 2.5
Component: General | Version:
Severity: major | Keywords:
-----------------------------+----------------------------------------------
Helli (a member in the forum) posted the fix for this bug in the forum 10
months ago for version 2.1 - this should be added to the list of
bugs/defects for the next release:
Add in wp-admin\export.php:
<excerpt:encoded><![CDATA[<?php echo $post->post_excerpt
?>]]></excerpt:encoded>
above:
<content:encoded><![CDATA[<?php echo $post->post_content
?>]]></content:encoded>
and in wp-admin\import\wordpress.php:
below:
$post_author = $this->get_tag( $post, 'dc:creator' );
place:
$post_excerpt = $this->get_tag( $post, 'excerpt:encoded' );
$post_excerpt = str_replace(array ('<![CDATA[', ']]>'), '',
$post_excerpt);
$post_excerpt = preg_replace('|<(/?[A-Z]+)|e', "'<' .
strtolower('$1')", $post_excerpt);
$post_excerpt = str_replace('<br>', '<br />', $post_excerpt);
$post_excerpt = str_replace('<hr>', '<hr />', $post_excerpt);
(above this line)
$post_content = $this->get_tag( $post, 'content:encoded' );
--
Ticket URL: <http://trac.wordpress.org/ticket/5555>
WordPress Trac <http://trac.wordpress.org/>
WordPress blogging software
More information about the wp-trac
mailing list