Ticket #63503: 63503.patch
| File 63503.patch, 1.3 KB (added by , 17 months ago) |
|---|
-
wp-admin/includes/export.php
406 406 407 407 if ( ! empty( $post_ids ) ) { 408 408 $post_ids = array_map( 'absint', $post_ids ); 409 $ and = 'AND ID IN ( ' . implode( ', ', $post_ids ) . ')';409 $chunks = array_chunk( $post_ids, 20 ); 410 410 } else { 411 $ and = '';411 $chunks = [[]]; 412 412 } 413 413 414 414 $authors = array(); 415 $results = $wpdb->get_results( "SELECT DISTINCT post_author FROM $wpdb->posts WHERE post_status != 'auto-draft' $and" ); 416 foreach ( (array) $results as $result ) { 417 $authors[] = get_userdata( $result->post_author ); 415 416 foreach ( $chunks as $chunk ) { 417 $and = ! empty( $chunk ) ? 'AND ID IN (' . implode( ', ', $chunk ) . ')' : ''; 418 419 $results = $wpdb->get_results( "SELECT DISTINCT post_author FROM $wpdb->posts WHERE post_status != 'auto-draft' $and" ); 420 421 foreach ( (array) $results as $result ) { 422 $authors[] = get_userdata( $result->post_author ); 423 } 418 424 } 419 425 420 426 $authors = array_filter( $authors ); 421 427 $authors = array_unique( $authors, SORT_REGULAR ); // Remove duplicate authors 422 428 foreach ( $authors as $author ) { 423 429 echo "\t<wp:author>"; 424 430 echo '<wp:author_id>' . (int) $author->ID . '</wp:author_id>';
![(please configure the [header_logo] section in trac.ini)](/chrome/site/your_project_logo.png)