+ * @since 3.1.0
+ */
+ function wxr_authors_list() {
+ global $wpdb;
+
+ $authors = array();
+ $results = $wpdb->get_results( "SELECT DISTINCT post_author FROM $wpdb->posts WHERE post_status != 'auto-draft'" );
+ foreach ( (array) $results as $result )
+ $authors[] = get_userdata( $result->post_author );
+
+ $authors = array_filter( $authors );
+
+ foreach ( $authors as $author ) {
+ echo "\t<wp:author>";
+ echo '<wp:author_id>' . $author->ID . '</wp:author_id>';
+ echo '<wp:author_login>' . $author->user_login . '</wp:author_login>';
+ echo '<wp:author_email>' . $author->user_email . '</wp:author_email>';
+ echo '<wp:author_display_name>' . wxr_cdata( $author->display_name ) . '</wp:author_display_name>';
+ echo '<wp:author_first_name>' . wxr_cdata( $author->user_firstname ) . '</wp:author_first_name>';
+ echo '<wp:author_last_name>' . wxr_cdata( $author->user_lastname ) . '</wp:author_last_name>';
+ echo "</wp:author>\n";
+ }
+ }
+
+ /**
+ * Ouput all navigation menu terms
+ *
+ * @since 3.1.0
+ */
+ function wxr_nav_menu_terms() {
+ $nav_menus = wp_get_nav_menus();
+ if ( empty( $nav_menus ) || ! is_array( $nav_menus ) )
+ return;
+
+ foreach ( $nav_menus as $menu ) {
+ echo "\t<wp:term><wp:term_id>{$menu->term_id}</wp:term_id><wp:term_taxonomy>nav_menu</wp:term_taxonomy><wp:term_slug>{$menu->slug}</wp:term_slug>";
+ wxr_term_name( $menu );
+ echo "</wp:term>\n";
+ }
+ }
+
+ /**
+ * Output list of taxonomy terms, in XML tag format, associated with a post
+ *
+ * @since 2.3.0