Default post information to use when populating the "Write Post" form.
Before using this function for your own theme or plugin, te wary of these non-obvious implicit behaviors (as of 4.2.3):
- The returned post will have a post_category member set, even if the $post_type does not use the category taxonomy.
- This post_category value will be scalar, which causes warnings passed into wp_insert_post without additional manipulation.
- Some of the post's fields will be pulled out of $_REQUEST if present, which may not be the intended goal.
<?php get_default_post_to_edit( $post_type, $create_in_db ); ?>
- (string) (optional) A post type string, defaults to 'post'.
- Default: post
- (boolean) (optional)
- Default: false
- stdClass object containing all the default post data as attributes
get_default_post_to_edit() is located in