Edit File by line
/home/barbar84/www/wp-admin/includes
File: export.php
</wp:tag>
[500] Fix | Delete
<?php endforeach; ?>
[501] Fix | Delete
<?php foreach ( $terms as $t ) : ?>
[502] Fix | Delete
<wp:term>
[503] Fix | Delete
<wp:term_id><?php echo (int) $t->term_id; ?></wp:term_id>
[504] Fix | Delete
<wp:term_taxonomy><?php echo wxr_cdata( $t->taxonomy ); ?></wp:term_taxonomy>
[505] Fix | Delete
<wp:term_slug><?php echo wxr_cdata( $t->slug ); ?></wp:term_slug>
[506] Fix | Delete
<wp:term_parent><?php echo wxr_cdata( $t->parent ? $terms[ $t->parent ]->slug : '' ); ?></wp:term_parent>
[507] Fix | Delete
<?php
[508] Fix | Delete
wxr_term_name( $t );
[509] Fix | Delete
wxr_term_description( $t );
[510] Fix | Delete
wxr_term_meta( $t );
[511] Fix | Delete
?>
[512] Fix | Delete
</wp:term>
[513] Fix | Delete
<?php endforeach; ?>
[514] Fix | Delete
<?php
[515] Fix | Delete
if ( 'all' === $args['content'] ) {
[516] Fix | Delete
wxr_nav_menu_terms();}
[517] Fix | Delete
?>
[518] Fix | Delete
[519] Fix | Delete
<?php
[520] Fix | Delete
/** This action is documented in wp-includes/feed-rss2.php */
[521] Fix | Delete
do_action( 'rss2_head' );
[522] Fix | Delete
?>
[523] Fix | Delete
[524] Fix | Delete
<?php
[525] Fix | Delete
if ( $post_ids ) {
[526] Fix | Delete
/**
[527] Fix | Delete
* @global WP_Query $wp_query WordPress Query object.
[528] Fix | Delete
*/
[529] Fix | Delete
global $wp_query;
[530] Fix | Delete
[531] Fix | Delete
// Fake being in the loop.
[532] Fix | Delete
$wp_query->in_the_loop = true;
[533] Fix | Delete
[534] Fix | Delete
// Fetch 20 posts at a time rather than loading the entire table into memory.
[535] Fix | Delete
while ( $next_posts = array_splice( $post_ids, 0, 20 ) ) {
[536] Fix | Delete
$where = 'WHERE ID IN (' . implode( ',', $next_posts ) . ')';
[537] Fix | Delete
$posts = $wpdb->get_results( "SELECT * FROM {$wpdb->posts} $where" );
[538] Fix | Delete
[539] Fix | Delete
// Begin Loop.
[540] Fix | Delete
foreach ( $posts as $post ) {
[541] Fix | Delete
setup_postdata( $post );
[542] Fix | Delete
[543] Fix | Delete
/**
[544] Fix | Delete
* Filters the post title used for WXR exports.
[545] Fix | Delete
*
[546] Fix | Delete
* @since 5.7.0
[547] Fix | Delete
*
[548] Fix | Delete
* @param string $post_title Title of the current post.
[549] Fix | Delete
*/
[550] Fix | Delete
$title = wxr_cdata( apply_filters( 'the_title_export', $post->post_title ) );
[551] Fix | Delete
[552] Fix | Delete
/**
[553] Fix | Delete
* Filters the post content used for WXR exports.
[554] Fix | Delete
*
[555] Fix | Delete
* @since 2.5.0
[556] Fix | Delete
*
[557] Fix | Delete
* @param string $post_content Content of the current post.
[558] Fix | Delete
*/
[559] Fix | Delete
$content = wxr_cdata( apply_filters( 'the_content_export', $post->post_content ) );
[560] Fix | Delete
[561] Fix | Delete
/**
[562] Fix | Delete
* Filters the post excerpt used for WXR exports.
[563] Fix | Delete
*
[564] Fix | Delete
* @since 2.6.0
[565] Fix | Delete
*
[566] Fix | Delete
* @param string $post_excerpt Excerpt for the current post.
[567] Fix | Delete
*/
[568] Fix | Delete
$excerpt = wxr_cdata( apply_filters( 'the_excerpt_export', $post->post_excerpt ) );
[569] Fix | Delete
[570] Fix | Delete
$is_sticky = is_sticky( $post->ID ) ? 1 : 0;
[571] Fix | Delete
?>
[572] Fix | Delete
<item>
[573] Fix | Delete
<title><?php echo $title; ?></title>
[574] Fix | Delete
<link><?php the_permalink_rss(); ?></link>
[575] Fix | Delete
<pubDate><?php echo mysql2date( 'D, d M Y H:i:s +0000', get_post_time( 'Y-m-d H:i:s', true ), false ); ?></pubDate>
[576] Fix | Delete
<dc:creator><?php echo wxr_cdata( get_the_author_meta( 'login' ) ); ?></dc:creator>
[577] Fix | Delete
<guid isPermaLink="false"><?php the_guid(); ?></guid>
[578] Fix | Delete
<description></description>
[579] Fix | Delete
<content:encoded><?php echo $content; ?></content:encoded>
[580] Fix | Delete
<excerpt:encoded><?php echo $excerpt; ?></excerpt:encoded>
[581] Fix | Delete
<wp:post_id><?php echo (int) $post->ID; ?></wp:post_id>
[582] Fix | Delete
<wp:post_date><?php echo wxr_cdata( $post->post_date ); ?></wp:post_date>
[583] Fix | Delete
<wp:post_date_gmt><?php echo wxr_cdata( $post->post_date_gmt ); ?></wp:post_date_gmt>
[584] Fix | Delete
<wp:post_modified><?php echo wxr_cdata( $post->post_modified ); ?></wp:post_modified>
[585] Fix | Delete
<wp:post_modified_gmt><?php echo wxr_cdata( $post->post_modified_gmt ); ?></wp:post_modified_gmt>
[586] Fix | Delete
<wp:comment_status><?php echo wxr_cdata( $post->comment_status ); ?></wp:comment_status>
[587] Fix | Delete
<wp:ping_status><?php echo wxr_cdata( $post->ping_status ); ?></wp:ping_status>
[588] Fix | Delete
<wp:post_name><?php echo wxr_cdata( $post->post_name ); ?></wp:post_name>
[589] Fix | Delete
<wp:status><?php echo wxr_cdata( $post->post_status ); ?></wp:status>
[590] Fix | Delete
<wp:post_parent><?php echo (int) $post->post_parent; ?></wp:post_parent>
[591] Fix | Delete
<wp:menu_order><?php echo (int) $post->menu_order; ?></wp:menu_order>
[592] Fix | Delete
<wp:post_type><?php echo wxr_cdata( $post->post_type ); ?></wp:post_type>
[593] Fix | Delete
<wp:post_password><?php echo wxr_cdata( $post->post_password ); ?></wp:post_password>
[594] Fix | Delete
<wp:is_sticky><?php echo (int) $is_sticky; ?></wp:is_sticky>
[595] Fix | Delete
<?php if ( 'attachment' === $post->post_type ) : ?>
[596] Fix | Delete
<wp:attachment_url><?php echo wxr_cdata( wp_get_attachment_url( $post->ID ) ); ?></wp:attachment_url>
[597] Fix | Delete
<?php endif; ?>
[598] Fix | Delete
<?php wxr_post_taxonomy(); ?>
[599] Fix | Delete
<?php
[600] Fix | Delete
$postmeta = $wpdb->get_results( $wpdb->prepare( "SELECT * FROM $wpdb->postmeta WHERE post_id = %d", $post->ID ) );
[601] Fix | Delete
foreach ( $postmeta as $meta ) :
[602] Fix | Delete
/**
[603] Fix | Delete
* Filters whether to selectively skip post meta used for WXR exports.
[604] Fix | Delete
*
[605] Fix | Delete
* Returning a truthy value from the filter will skip the current meta
[606] Fix | Delete
* object from being exported.
[607] Fix | Delete
*
[608] Fix | Delete
* @since 3.3.0
[609] Fix | Delete
*
[610] Fix | Delete
* @param bool $skip Whether to skip the current post meta. Default false.
[611] Fix | Delete
* @param string $meta_key Current meta key.
[612] Fix | Delete
* @param object $meta Current meta object.
[613] Fix | Delete
*/
[614] Fix | Delete
if ( apply_filters( 'wxr_export_skip_postmeta', false, $meta->meta_key, $meta ) ) {
[615] Fix | Delete
continue;
[616] Fix | Delete
}
[617] Fix | Delete
?>
[618] Fix | Delete
<wp:postmeta>
[619] Fix | Delete
<wp:meta_key><?php echo wxr_cdata( $meta->meta_key ); ?></wp:meta_key>
[620] Fix | Delete
<wp:meta_value><?php echo wxr_cdata( $meta->meta_value ); ?></wp:meta_value>
[621] Fix | Delete
</wp:postmeta>
[622] Fix | Delete
<?php
[623] Fix | Delete
endforeach;
[624] Fix | Delete
[625] Fix | Delete
$_comments = $wpdb->get_results( $wpdb->prepare( "SELECT * FROM $wpdb->comments WHERE comment_post_ID = %d AND comment_approved <> 'spam'", $post->ID ) );
[626] Fix | Delete
$comments = array_map( 'get_comment', $_comments );
[627] Fix | Delete
foreach ( $comments as $c ) :
[628] Fix | Delete
?>
[629] Fix | Delete
<wp:comment>
[630] Fix | Delete
<wp:comment_id><?php echo (int) $c->comment_ID; ?></wp:comment_id>
[631] Fix | Delete
<wp:comment_author><?php echo wxr_cdata( $c->comment_author ); ?></wp:comment_author>
[632] Fix | Delete
<wp:comment_author_email><?php echo wxr_cdata( $c->comment_author_email ); ?></wp:comment_author_email>
[633] Fix | Delete
<wp:comment_author_url><?php echo esc_url_raw( $c->comment_author_url ); ?></wp:comment_author_url>
[634] Fix | Delete
<wp:comment_author_IP><?php echo wxr_cdata( $c->comment_author_IP ); ?></wp:comment_author_IP>
[635] Fix | Delete
<wp:comment_date><?php echo wxr_cdata( $c->comment_date ); ?></wp:comment_date>
[636] Fix | Delete
<wp:comment_date_gmt><?php echo wxr_cdata( $c->comment_date_gmt ); ?></wp:comment_date_gmt>
[637] Fix | Delete
<wp:comment_content><?php echo wxr_cdata( $c->comment_content ); ?></wp:comment_content>
[638] Fix | Delete
<wp:comment_approved><?php echo wxr_cdata( $c->comment_approved ); ?></wp:comment_approved>
[639] Fix | Delete
<wp:comment_type><?php echo wxr_cdata( $c->comment_type ); ?></wp:comment_type>
[640] Fix | Delete
<wp:comment_parent><?php echo (int) $c->comment_parent; ?></wp:comment_parent>
[641] Fix | Delete
<wp:comment_user_id><?php echo (int) $c->user_id; ?></wp:comment_user_id>
[642] Fix | Delete
<?php
[643] Fix | Delete
$c_meta = $wpdb->get_results( $wpdb->prepare( "SELECT * FROM $wpdb->commentmeta WHERE comment_id = %d", $c->comment_ID ) );
[644] Fix | Delete
foreach ( $c_meta as $meta ) :
[645] Fix | Delete
/**
[646] Fix | Delete
* Filters whether to selectively skip comment meta used for WXR exports.
[647] Fix | Delete
*
[648] Fix | Delete
* Returning a truthy value from the filter will skip the current meta
[649] Fix | Delete
* object from being exported.
[650] Fix | Delete
*
[651] Fix | Delete
* @since 4.0.0
[652] Fix | Delete
*
[653] Fix | Delete
* @param bool $skip Whether to skip the current comment meta. Default false.
[654] Fix | Delete
* @param string $meta_key Current meta key.
[655] Fix | Delete
* @param object $meta Current meta object.
[656] Fix | Delete
*/
[657] Fix | Delete
if ( apply_filters( 'wxr_export_skip_commentmeta', false, $meta->meta_key, $meta ) ) {
[658] Fix | Delete
continue;
[659] Fix | Delete
}
[660] Fix | Delete
?>
[661] Fix | Delete
<wp:commentmeta>
[662] Fix | Delete
<wp:meta_key><?php echo wxr_cdata( $meta->meta_key ); ?></wp:meta_key>
[663] Fix | Delete
<wp:meta_value><?php echo wxr_cdata( $meta->meta_value ); ?></wp:meta_value>
[664] Fix | Delete
</wp:commentmeta>
[665] Fix | Delete
<?php endforeach; ?>
[666] Fix | Delete
</wp:comment>
[667] Fix | Delete
<?php endforeach; ?>
[668] Fix | Delete
</item>
[669] Fix | Delete
<?php
[670] Fix | Delete
}
[671] Fix | Delete
}
[672] Fix | Delete
}
[673] Fix | Delete
?>
[674] Fix | Delete
</channel>
[675] Fix | Delete
</rss>
[676] Fix | Delete
<?php
[677] Fix | Delete
}
[678] Fix | Delete
[679] Fix | Delete
12
It is recommended that you Edit text format, this type of Fix handles quite a lot in one request
Function