252
252
if ( empty( $term->description ) )
255
echo '<wp:term_description>' . wxr_cdata( $term->description ) . '</wp:term_description>';
255
echo "\t\t<wp:term_description>" . wxr_cdata( $term->description ) . "</wp:term_description>\n";
259
* Output term meta XML tags for a given term object.
263
* @param WP_Term $term Term object.
265
function wxr_term_meta( $term ) {
268
$termmeta = $wpdb->get_results( $wpdb->prepare( "SELECT * FROM $wpdb->termmeta WHERE term_id = %d", $term->term_id ) );
270
foreach ( $termmeta as $meta ) {
272
* Filters whether to selectively skip term meta used for WXR exports.
274
* Returning a truthy value to the filter will skip the current meta
275
* object from being exported.
279
* @param bool $skip Whether to skip the current piece of term meta. Default false.
280
* @param string $meta_key Current meta key.
281
* @param object $meta Current meta object.
283
if ( ! apply_filters( 'wxr_export_skip_termmeta', false, $meta->meta_key, $meta ) ) {
284
printf( "\t\t<wp:termmeta>\n\t\t\t<wp:meta_key>%s</wp:meta_key>\n\t\t\t<wp:meta_value>%s</wp:meta_value>\n\t\t</wp:termmeta>\n", wxr_cdata( $meta->meta_key ), wxr_cdata( $meta->meta_value ) );
386
417
<?php wxr_authors_list( $post_ids ); ?>
388
419
<?php foreach ( $cats as $c ) : ?>
389
<wp:category><wp:term_id><?php echo intval( $c->term_id ); ?></wp:term_id><wp:category_nicename><?php echo wxr_cdata( $c->slug ); ?></wp:category_nicename><wp:category_parent><?php echo wxr_cdata( $c->parent ? $cats[$c->parent]->slug : '' ); ?></wp:category_parent><?php wxr_cat_name( $c ); ?><?php wxr_category_description( $c ); ?></wp:category>
421
<wp:term_id><?php echo intval( $c->term_id ); ?></wp:term_id>
422
<wp:category_nicename><?php echo wxr_cdata( $c->slug ); ?></wp:category_nicename>
423
<wp:category_parent><?php echo wxr_cdata( $c->parent ? $cats[$c->parent]->slug : '' ); ?></wp:category_parent>
424
<?php wxr_cat_name( $c );
425
wxr_category_description( $c );
426
wxr_term_meta( $c ); ?>
390
428
<?php endforeach; ?>
391
429
<?php foreach ( $tags as $t ) : ?>
392
<wp:tag><wp:term_id><?php echo intval( $t->term_id ); ?></wp:term_id><wp:tag_slug><?php echo wxr_cdata( $t->slug ); ?></wp:tag_slug><?php wxr_tag_name( $t ); ?><?php wxr_tag_description( $t ); ?></wp:tag>
431
<wp:term_id><?php echo intval( $t->term_id ); ?></wp:term_id>
432
<wp:tag_slug><?php echo wxr_cdata( $t->slug ); ?></wp:tag_slug>
433
<?php wxr_tag_name( $t );
434
wxr_tag_description( $t );
435
wxr_term_meta( $t ); ?>
393
437
<?php endforeach; ?>
394
438
<?php foreach ( $terms as $t ) : ?>
395
<wp:term><wp:term_id><?php echo wxr_cdata( $t->term_id ); ?></wp:term_id><wp:term_taxonomy><?php echo wxr_cdata( $t->taxonomy ); ?></wp:term_taxonomy><wp:term_slug><?php echo wxr_cdata( $t->slug ); ?></wp:term_slug><wp:term_parent><?php echo wxr_cdata( $t->parent ? $terms[$t->parent]->slug : '' ); ?></wp:term_parent><?php wxr_term_name( $t ); ?><?php wxr_term_description( $t ); ?></wp:term>
440
<wp:term_id><?php echo wxr_cdata( $t->term_id ); ?></wp:term_id>
441
<wp:term_taxonomy><?php echo wxr_cdata( $t->taxonomy ); ?></wp:term_taxonomy>
442
<wp:term_slug><?php echo wxr_cdata( $t->slug ); ?></wp:term_slug>
443
<wp:term_parent><?php echo wxr_cdata( $t->parent ? $terms[$t->parent]->slug : '' ); ?></wp:term_parent>
444
<?php wxr_term_name( $t );
445
wxr_term_description( $t );
446
wxr_term_meta( $t ); ?>
396
448
<?php endforeach; ?>
397
449
<?php if ( 'all' == $args['content'] ) wxr_nav_menu_terms(); ?>
469
521
<?php $postmeta = $wpdb->get_results( $wpdb->prepare( "SELECT * FROM $wpdb->postmeta WHERE post_id = %d", $post->ID ) );
470
522
foreach ( $postmeta as $meta ) :
472
* Filter whether to selectively skip post meta used for WXR exports.
524
* Filters whether to selectively skip post meta used for WXR exports.
474
526
* Returning a truthy value to the filter will skip the current meta
475
527
* object from being exported.
508
560
<?php $c_meta = $wpdb->get_results( $wpdb->prepare( "SELECT * FROM $wpdb->commentmeta WHERE comment_id = %d", $c->comment_ID ) );
509
561
foreach ( $c_meta as $meta ) :
511
* Filter whether to selectively skip comment meta used for WXR exports.
563
* Filters whether to selectively skip comment meta used for WXR exports.
513
565
* Returning a truthy value to the filter will skip the current meta
514
566
* object from being exported.