wxr_post_taxonomy() – Output list of taxonomy terms, in XML tag format, associated with a post
You appear to be a bot. Output may be restricted
Description
Outputs list of taxonomy terms, in XML tag format, associated with a post.
Usage
wxr_post_taxonomy();
Parameters
Returns
void
Source
File name: wordpress/wp-admin/includes/export.php
Lines:
1 to 13 of 13
function wxr_post_taxonomy() { $post = get_post(); $taxonomies = get_object_taxonomies( $post->post_type ); if ( empty( $taxonomies ) ) { return; } $terms = wp_get_object_terms( $post->ID, $taxonomies ); foreach ( (array) $terms as $term ) { echo "\t\t<category domain=\"{$term->taxonomy}\" nicename=\"{$term->slug}\">" . wxr_cdata( $term->name ) . "</category>\n"; } }