@@ -221,14 +221,12 @@ function ( $posts ) {
221221
222222 add_filter (
223223 'wp_import_post_comments ' ,
224- function ( $ comments, $ post_id , $ post ) {
224+ function ( $ comments ) {
225225 global $ wpcli_import_counts ;
226226 $ wpcli_import_counts ['current_comment ' ] = 0 ;
227227 $ wpcli_import_counts ['total_comments ' ] = count ( $ comments );
228228 return $ comments ;
229- },
230- 10 ,
231- 3
229+ }
232230 );
233231
234232 add_filter (
@@ -249,7 +247,7 @@ function ( $post ) {
249247
250248 add_action (
251249 'wp_import_insert_post ' ,
252- function ( $ post_id, $ original_post_id , $ post , $ postdata ) {
250+ function ( $ post_id ) {
253251 global $ wpcli_import_counts ;
254252 if ( is_wp_error ( $ post_id ) ) {
255253 WP_CLI ::warning ( '-- Error importing post: ' . $ post_id ->get_error_code () );
@@ -261,47 +259,43 @@ function ( $post_id, $original_post_id, $post, $postdata ) {
261259 WP_CLI \Utils \wp_clear_object_cache ();
262260 WP_CLI ::log ( '-- Cleared object cache. ' );
263261 }
264- },
265- 10 ,
266- 4
262+ }
267263 );
268264
269265 add_action (
270266 'wp_import_insert_term ' ,
271- function ( $ t , $ import_term, $ post_id , $ post ) {
267+ function ( $ t , $ import_term ) {
272268 WP_CLI ::log ( "-- Created term \"{$ import_term ['name ' ]}\"" );
273269 },
274270 10 ,
275- 4
271+ 2
276272 );
277273
278274 add_action (
279275 'wp_import_set_post_terms ' ,
280- function ( $ tt_ids , $ term_ids , $ taxonomy, $ post_id , $ post ) {
276+ function ( $ tt_ids , $ term_ids , $ taxonomy ) {
281277 WP_CLI ::log ( '-- Added terms ( ' . implode ( ', ' , $ term_ids ) . ") for taxonomy \"{$ taxonomy }\"" );
282278 },
283279 10 ,
284- 5
280+ 3
285281 );
286282
287283 add_action (
288284 'wp_import_insert_comment ' ,
289- function ( $ comment_id, $ comment , $ comment_post_id , $ post ) {
285+ function ( $ comment_id ) {
290286 global $ wpcli_import_counts ;
291287 $ wpcli_import_counts ['current_comment ' ]++;
292288 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 ' ] ) ) );
293- },
294- 10 ,
295- 4
289+ }
296290 );
297291
298292 add_action (
299293 'import_post_meta ' ,
300- function ( $ post_id , $ key, $ value ) {
294+ function ( $ post_id , $ key ) {
301295 WP_CLI ::log ( "-- Added post_meta $ key " );
302296 },
303297 10 ,
304- 3
298+ 2
305299 );
306300 }
307301
0 commit comments