Changeset 29206 for trunk/src/wp-admin/includes/export.php
- Timestamp:
- 07/17/2014 09:13:53 AM (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-admin/includes/export.php
r28731 r29206 84 84 } 85 85 86 // grab a snapshot of post IDs, just in case it changes during the export86 // Grab a snapshot of post IDs, just in case it changes during the export. 87 87 $post_ids = $wpdb->get_col( "SELECT ID FROM {$wpdb->posts} $join WHERE $where" ); 88 88 89 // get the requested terms ready, empty unless posts filtered by category or all content 89 /* 90 * Get the requested terms ready, empty unless posts filtered by category 91 * or all content. 92 */ 90 93 $cats = $tags = $terms = array(); 91 94 if ( isset( $term ) && $term ) { … … 100 103 $custom_terms = (array) get_terms( $custom_taxonomies, array( 'get' => 'all' ) ); 101 104 102 // put categories in order with no child going before its parent105 // Put categories in order with no child going before its parent. 103 106 while ( $cat = array_shift( $categories ) ) { 104 107 if ( $cat->parent == 0 || isset( $cats[$cat->parent] ) ) … … 108 111 } 109 112 110 // put terms in order with no child going before its parent113 // Put terms in order with no child going before its parent. 111 114 while ( $t = array_shift( $custom_terms ) ) { 112 115 if ( $t->parent == 0 || isset( $terms[$t->parent] ) ) … … 145 148 */ 146 149 function wxr_site_url() { 147 // ms: the base url150 // Multisite: the base URL. 148 151 if ( is_multisite() ) 149 152 return network_home_url(); 150 // wp: the blog url153 // WordPress (single site): the blog URL. 151 154 else 152 155 return get_bloginfo_rss( 'url' ); … … 374 377 <?php if ( $post_ids ) { 375 378 global $wp_query; 376 $wp_query->in_the_loop = true; // Fake being in the loop. 377 378 // fetch 20 posts at a time rather than loading the entire table into memory 379 380 // Fake being in the loop. 381 $wp_query->in_the_loop = true; 382 383 // Fetch 20 posts at a time rather than loading the entire table into memory. 379 384 while ( $next_posts = array_splice( $post_ids, 0, 20 ) ) { 380 385 $where = 'WHERE ID IN (' . join( ',', $next_posts ) . ')'; 381 386 $posts = $wpdb->get_results( "SELECT * FROM {$wpdb->posts} $where" ); 382 387 383 // Begin Loop 388 // Begin Loop. 384 389 foreach ( $posts as $post ) { 385 390 setup_postdata( $post );
Note: See TracChangeset
for help on using the changeset viewer.