@@ -210,7 +210,7 @@ private function add_wxr_filters() {
210210
211211 add_filter (
212212 'wp_import_posts ' ,
213- function ( $ posts ) {
213+ function ( $ posts ) {
214214 global $ wpcli_import_counts ;
215215 $ wpcli_import_counts ['current_post ' ] = 0 ;
216216 $ wpcli_import_counts ['total_posts ' ] = count ( $ posts );
@@ -221,7 +221,7 @@ function( $posts ) {
221221
222222 add_filter (
223223 'wp_import_post_comments ' ,
224- function ( $ comments , $ post_id , $ post ) {
224+ function ( $ comments , $ post_id , $ post ) {
225225 global $ wpcli_import_counts ;
226226 $ wpcli_import_counts ['current_comment ' ] = 0 ;
227227 $ wpcli_import_counts ['total_comments ' ] = count ( $ comments );
@@ -233,7 +233,7 @@ function( $comments, $post_id, $post ) {
233233
234234 add_filter (
235235 'wp_import_post_data_raw ' ,
236- function ( $ post ) {
236+ function ( $ post ) {
237237 global $ wpcli_import_counts , $ wpcli_import_current_file ;
238238
239239 $ wpcli_import_counts ['current_post ' ]++;
@@ -249,7 +249,7 @@ function( $post ) {
249249
250250 add_action (
251251 'wp_import_insert_post ' ,
252- function ( $ post_id , $ original_post_id , $ post , $ postdata ) {
252+ function ( $ post_id , $ original_post_id , $ post , $ postdata ) {
253253 global $ wpcli_import_counts ;
254254 if ( is_wp_error ( $ post_id ) ) {
255255 WP_CLI ::warning ( '-- Error importing post: ' . $ post_id ->get_error_code () );
@@ -261,15 +261,14 @@ function( $post_id, $original_post_id, $post, $postdata ) {
261261 WP_CLI \Utils \wp_clear_object_cache ();
262262 WP_CLI ::log ( '-- Cleared object cache. ' );
263263 }
264-
265264 },
266265 10 ,
267266 4
268267 );
269268
270269 add_action (
271270 'wp_import_insert_term ' ,
272- function ( $ t , $ import_term , $ post_id , $ post ) {
271+ function ( $ t , $ import_term , $ post_id , $ post ) {
273272 WP_CLI ::log ( "-- Created term \"{$ import_term ['name ' ]}\"" );
274273 },
275274 10 ,
@@ -278,7 +277,7 @@ function( $t, $import_term, $post_id, $post ) {
278277
279278 add_action (
280279 'wp_import_set_post_terms ' ,
281- function ( $ tt_ids , $ term_ids , $ taxonomy , $ post_id , $ post ) {
280+ function ( $ tt_ids , $ term_ids , $ taxonomy , $ post_id , $ post ) {
282281 WP_CLI ::log ( '-- Added terms ( ' . implode ( ', ' , $ term_ids ) . ") for taxonomy \"{$ taxonomy }\"" );
283282 },
284283 10 ,
@@ -287,7 +286,7 @@ function( $tt_ids, $term_ids, $taxonomy, $post_id, $post ) {
287286
288287 add_action (
289288 'wp_import_insert_comment ' ,
290- function ( $ comment_id , $ comment , $ comment_post_id , $ post ) {
289+ function ( $ comment_id , $ comment , $ comment_post_id , $ post ) {
291290 global $ wpcli_import_counts ;
292291 $ wpcli_import_counts ['current_comment ' ]++;
293292 WP_CLI ::log ( sprintf ( '-- Added comment #%d (%s of %s) ' , $ comment_id , number_format ( $ wpcli_import_counts ['current_comment ' ] ), number_format ( $ wpcli_import_counts ['total_comments ' ] ) ) );
@@ -298,13 +297,12 @@ function( $comment_id, $comment, $comment_post_id, $post ) {
298297
299298 add_action (
300299 'import_post_meta ' ,
301- function ( $ post_id , $ key , $ value ) {
300+ function ( $ post_id , $ key , $ value ) {
302301 WP_CLI ::log ( "-- Added post_meta $ key " );
303302 },
304303 10 ,
305304 3
306305 );
307-
308306 }
309307
310308 /**
@@ -448,7 +446,6 @@ private function create_authors_for_mapping( $author_data ) {
448446 );
449447 }
450448 return $ author_mapping ;
451-
452449 }
453450
454451 /**
@@ -499,5 +496,4 @@ private function suggest_user( $author_user_login, $author_user_email = '' ) {
499496
500497 return $ closest ;
501498 }
502-
503499}
0 commit comments