Commit 413b7ea
committed
Posts, Post Types: Check the result of creating a draft in
As `wp_insert_post()` can return an error for various reasons, this commit ensures that this scenario is properly handled and an error message is displayed.
Follow-up to [12987].
Props rishabhwp, tfrommen, SirLouen, siliconforks, SergeyBiryukov.
Fixes #37441.
git-svn-id: https://develop.svn.wordpress.org/trunk@60701 602fd350-edb4-49c9-b593-d223f7449a82get_default_post_to_edit().1 parent 57c1af7 commit 413b7ea
File tree
2 files changed
+23
-2
lines changed- src/wp-admin/includes
- tests/phpunit/tests/admin
2 files changed
+23
-2
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
768 | 768 | | |
769 | 769 | | |
770 | 770 | | |
771 | | - | |
| 771 | + | |
772 | 772 | | |
773 | 773 | | |
774 | | - | |
| 774 | + | |
| 775 | + | |
| 776 | + | |
| 777 | + | |
| 778 | + | |
| 779 | + | |
| 780 | + | |
775 | 781 | | |
776 | 782 | | |
777 | 783 | | |
| 784 | + | |
778 | 785 | | |
779 | 786 | | |
780 | 787 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
534 | 534 | | |
535 | 535 | | |
536 | 536 | | |
| 537 | + | |
| 538 | + | |
| 539 | + | |
| 540 | + | |
| 541 | + | |
| 542 | + | |
| 543 | + | |
| 544 | + | |
| 545 | + | |
| 546 | + | |
| 547 | + | |
| 548 | + | |
| 549 | + | |
| 550 | + | |
537 | 551 | | |
538 | 552 | | |
539 | 553 | | |
| |||
0 commit comments