Fake being in the loop during export so that template tags work.
git-svn-id: http://svn.automattic.com/wordpress/trunk@6130 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
8eceaca349
commit
bbe284b1d1
|
@ -188,6 +188,8 @@ print '<?xml version="1.0" encoding="' . get_bloginfo('charset') . '"?' . ">\n";
|
||||||
<?php endforeach; endif; ?>
|
<?php endforeach; endif; ?>
|
||||||
<?php do_action('rss2_head'); ?>
|
<?php do_action('rss2_head'); ?>
|
||||||
<?php if ($post_ids) {
|
<?php if ($post_ids) {
|
||||||
|
global $wp_query;
|
||||||
|
$wp_query->in_the_loop = true; // Fake being in the loop.
|
||||||
// fetch 20 posts at a time rather than loading the entire table into memory
|
// fetch 20 posts at a time rather than loading the entire table into memory
|
||||||
while ( $next_posts = array_splice($post_ids, 0, 20) ) {
|
while ( $next_posts = array_splice($post_ids, 0, 20) ) {
|
||||||
$where = "WHERE ID IN (".join(',', $next_posts).")";
|
$where = "WHERE ID IN (".join(',', $next_posts).")";
|
||||||
|
|
Loading…
Reference in New Issue