equal
deleted
inserted
replaced
236 */ |
236 */ |
237 function wxr_authors_list() { |
237 function wxr_authors_list() { |
238 global $wpdb; |
238 global $wpdb; |
239 |
239 |
240 $authors = array(); |
240 $authors = array(); |
241 $results = $wpdb->get_results( "SELECT DISTINCT post_author FROM $wpdb->posts" ); |
241 $results = $wpdb->get_results( "SELECT DISTINCT post_author FROM $wpdb->posts WHERE post_status != 'auto-draft'" ); |
242 foreach ( (array) $results as $result ) |
242 foreach ( (array) $results as $result ) |
243 $authors[] = get_userdata( $result->post_author ); |
243 $authors[] = get_userdata( $result->post_author ); |
244 |
244 |
245 $authors = array_filter( $authors ); |
245 $authors = array_filter( $authors ); |
246 |
246 |
277 * Output list of taxonomy terms, in XML tag format, associated with a post |
277 * Output list of taxonomy terms, in XML tag format, associated with a post |
278 * |
278 * |
279 * @since 2.3.0 |
279 * @since 2.3.0 |
280 */ |
280 */ |
281 function wxr_post_taxonomy() { |
281 function wxr_post_taxonomy() { |
282 global $post; |
282 $post = get_post(); |
283 |
283 |
284 $taxonomies = get_object_taxonomies( $post->post_type ); |
284 $taxonomies = get_object_taxonomies( $post->post_type ); |
285 if ( empty( $taxonomies ) ) |
285 if ( empty( $taxonomies ) ) |
286 return; |
286 return; |
287 $terms = wp_get_object_terms( $post->ID, $taxonomies ); |
287 $terms = wp_get_object_terms( $post->ID, $taxonomies ); |