Changes from branches/3.1/wp-admin/includes/export.php at r17416 to trunk/wp-admin/includes/export.php at r17989
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-admin/includes/export.php
r17416 r17989 50 50 $post_types = get_post_types( array( 'can_export' => true ) ); 51 51 $esses = array_fill( 0, count($post_types), '%s' ); 52 $where = $wpdb->prepare( "{$wpdb->posts}.post_type IN (" . implode(',',$esses) .")", $post_types );52 $where = $wpdb->prepare( "{$wpdb->posts}.post_type IN (" . implode( ',', $esses ) . ')', $post_types ); 53 53 } 54 54 … … 124 124 125 125 // $str = ent2ncr(esc_html($str)); 126 $str = "<![CDATA[$str" . ( ( substr( $str, -1 ) == ']' ) ? ' ' : '' ) . "]]>";126 $str = "<![CDATA[$str" . ( ( substr( $str, -1 ) == ']' ) ? ' ' : '' ) . ']]>'; 127 127 128 128 return $str; … … 351 351 // fetch 20 posts at a time rather than loading the entire table into memory 352 352 while ( $next_posts = array_splice( $post_ids, 0, 20 ) ) { 353 $where = "WHERE ID IN (" . join( ',', $next_posts ) . ")";353 $where = 'WHERE ID IN (' . join( ',', $next_posts ) . ')'; 354 354 $posts = $wpdb->get_results( "SELECT * FROM {$wpdb->posts} $where" ); 355 355 … … 385 385 <?php wxr_post_taxonomy(); ?> 386 386 <?php $postmeta = $wpdb->get_results( $wpdb->prepare( "SELECT * FROM $wpdb->postmeta WHERE post_id = %d", $post->ID ) ); 387 if ( $postmeta ) :foreach( $postmeta as $meta ) : if ( $meta->meta_key != '_edit_lock' ) : ?>387 foreach( $postmeta as $meta ) : if ( $meta->meta_key != '_edit_lock' ) : ?> 388 388 <wp:postmeta> 389 389 <wp:meta_key><?php echo $meta->meta_key; ?></wp:meta_key> 390 390 <wp:meta_value><?php echo wxr_cdata( $meta->meta_value ); ?></wp:meta_value> 391 391 </wp:postmeta> 392 <?php endif; endforeach; endif;?>392 <?php endif; endforeach; ?> 393 393 <?php $comments = $wpdb->get_results( $wpdb->prepare( "SELECT * FROM $wpdb->comments WHERE comment_post_ID = %d AND comment_approved <> 'spam'", $post->ID ) ); 394 if ( $comments ) :foreach ( $comments as $c ) : ?>394 foreach ( $comments as $c ) : ?> 395 395 <wp:comment> 396 396 <wp:comment_id><?php echo $c->comment_ID; ?></wp:comment_id> … … 406 406 <wp:comment_parent><?php echo $c->comment_parent; ?></wp:comment_parent> 407 407 <wp:comment_user_id><?php echo $c->user_id; ?></wp:comment_user_id> 408 <?php $c_meta = $wpdb->get_results( $wpdb->prepare( "SELECT * FROM $wpdb->commentmeta WHERE comment_id = %d", $c->comment_ID ) ); 409 foreach ( $c_meta as $meta ) : ?> 410 <wp:commentmeta> 411 <wp:meta_key><?php echo $meta->meta_key; ?></wp:meta_key> 412 <wp:meta_value><?php echo wxr_cdata( $meta->meta_value ); ?></wp:meta_value> 413 </wp:commentmeta> 414 <?php endforeach; ?> 408 415 </wp:comment> 409 <?php endforeach; endif;?>416 <?php endforeach; ?> 410 417 </item> 411 418 <?php
Note: See TracChangeset
for help on using the changeset viewer.