From e4484ddaf36237966fa737610c81cba037cc560c Mon Sep 17 00:00:00 2001 From: Stephen Harris Date: Sun, 12 Mar 2017 14:25:22 +0000 Subject: [PATCH] Returning a falsey value on a wxr_importer.pre_process.* filter should skip only the current item, not all subsequent items. --- class-wxr-importer.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/class-wxr-importer.php b/class-wxr-importer.php index 51c6a80..ad3140d 100644 --- a/class-wxr-importer.php +++ b/class-wxr-importer.php @@ -1145,7 +1145,7 @@ protected function process_post_meta( $meta, $post_id, $post ) { */ $meta_item = apply_filters( 'wxr_importer.pre_process.post_meta', $meta_item, $post_id ); if ( empty( $meta_item ) ) { - return false; + continue; } $key = apply_filters( 'import_post_meta_key', $meta_item['key'], $post_id, $post ); @@ -1286,7 +1286,7 @@ protected function process_comments( $comments, $post_id, $post, $post_exists = */ $comment = apply_filters( 'wxr_importer.pre_process.comment', $comment, $post_id ); if ( empty( $comment ) ) { - return false; + continue; } $original_id = isset( $comment['comment_id'] ) ? (int) $comment['comment_id'] : 0;