diff --git a/includes/admin/importers/class-sp-player-importer.php b/includes/admin/importers/class-sp-player-importer.php index 98d9cdfb..7aff2890 100644 --- a/includes/admin/importers/class-sp-player-importer.php +++ b/includes/admin/importers/class-sp-player-importer.php @@ -122,6 +122,10 @@ if ( class_exists( 'WP_Importer' ) ) { } else: $args = array( 'post_type' => 'sp_player', 'post_status' => 'publish', 'post_title' => wp_strip_all_tags( $name ) ); + // Check if a DoB was set + if( '0000-00-00' !== $date ){ + $args['post_date'] = $date; + } $id = wp_insert_post( $args ); // Flag as import @@ -220,7 +224,7 @@ if ( class_exists( 'WP_Importer' ) ) { function greet() { echo '
'; echo '

' . __( 'Hi there! Choose a .csv file to upload, then click "Upload file and import".', 'sportspress' ).'

'; - echo '

' . sprintf( __( 'Players need to be defined with columns in a specific order (7 columns). Click here to download a sample.', 'sportspress' ), plugin_dir_url( SP_PLUGIN_FILE ) . 'dummy-data/players-sample.csv' ) . '

'; + echo '

' . sprintf( __( 'Players need to be defined with columns in a specific order (8 columns). Click here to download a sample.', 'sportspress' ), plugin_dir_url( SP_PLUGIN_FILE ) . 'dummy-data/players-sample.csv' ) . '

'; wp_import_upload_form( 'admin.php?import=sp_player_csv&step=1' ); echo '
'; }