WordPress.org

Make WordPress Core

Opened 12 months ago

#20900 new defect (bug)

Throw an error in `get_default_post_to_edit` if the specified post type is not defined.

Reported by: georgestephanis Owned by:
Priority: normal Milestone: Awaiting Review
Component: Post Types Version:
Severity: minor Keywords: has-patch 2nd-opinion
Cc:

Description

Currently get_default_post_to_edit will generate a post with the specified post type, even if it doesn't exist. Let's give it a chance to do something else.

If this is conceptually a good idea, also do it during wp_insert_post() and other similar functions.

Attachments (1)

20900.diff (625 bytes) - added by georgestephanis 12 months ago.

Download all attachments as: .zip

Change History (1)

georgestephanis12 months ago

Note: See TracTickets for help on using tickets.