Skip to content

Commit

Permalink
allow fallback to post if no post_type set
Browse files Browse the repository at this point in the history
  • Loading branch information
andrewklimek committed May 12, 2019
1 parent 3ecada2 commit 22975b2
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 4 deletions.
2 changes: 1 addition & 1 deletion languages/really-simple-csv-importer-fr_FR.po
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ msgid "Invalid post type \"%s\"."
msgstr "Type de post invalide \"%s\"."

#: rs-csv-importer.php:177
msgid "Note: Please include post_type value if that is possible."
msgid "Note: post_type was not set. Defaulting to “post”"
msgstr "Note: Veuillez inclure une valeur de post_type si c’est possible."

#: rs-csv-importer.php:192
Expand Down
2 changes: 1 addition & 1 deletion languages/really-simple-csv-importer-ja.po
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ msgid "Invalid post type \"%s\"."
msgstr "\"%s\" は不正な投稿タイプです。"

#: rs-csv-importer.php:177
msgid "Note: Please include post_type value if that is possible."
msgid "Note: post_type was not set. Defaulting to “post”"
msgstr "注: 可能な場合 post_type 値を記載してください。"

#: rs-csv-importer.php:192
Expand Down
2 changes: 1 addition & 1 deletion languages/really-simple-csv-importer.pot
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ msgid "Invalid post type \"%s\"."
msgstr ""

#: rs-csv-importer.php:177
msgid "Note: Please include post_type value if that is possible."
msgid "Note: post_type was not set. Defaulting to “post”"
msgstr ""

#: rs-csv-importer.php:192
Expand Down
3 changes: 2 additions & 1 deletion rs-csv-importer.php
Original file line number Diff line number Diff line change
Expand Up @@ -193,7 +193,8 @@ function process_posts() {
$error->add( 'post_type_exists', sprintf(__('Invalid post type "%s".', 'really-simple-csv-importer'), $post_type) );
}
} else {
echo __('Note: Please include post_type value if that is possible.', 'really-simple-csv-importer').'<br>';
$post['post_type'] = 'post';
echo __('Note: post_type was not set. Defaulting to “post”', 'really-simple-csv-importer').'<br>';
}

// (int) post id
Expand Down

0 comments on commit 22975b2

Please sign in to comment.