Count skipped players during import

This commit is contained in:
Brian Miyaji
2017-11-15 23:07:33 +11:00
parent aae1f374a0
commit 6309e5b70b

View File

@@ -65,11 +65,19 @@ if ( class_exists( 'WP_Importer' ) ) {
if ( empty( $row ) ) continue;
$player_name = sp_array_value( $row, $name_index );
if ( ! $player_name ) continue;
if ( ! $player_name ):
$this->skipped ++;
continue;
endif;
$player_object = get_page_by_title( stripslashes( $player_name ), OBJECT, 'sp_player' );
if ( ! $player_object ) continue;
if ( ! $player_object ):
$this->skipped ++;
continue;
endif;
$player_id = $player_object->ID;
$team_players[] = $player_id;