Core Function
View Source on Trac ↗ get_default_post_to_edit()
get_default_post_to_edit( mixed $post_type = 'post', mixed $create_in_db = false ) Returns default post information to use when populating the "Write Post" form.
Parameters 0 required
| Name / Type | Description |
|---|---|
| $post_type string | Optional. A post type string. Default 'post'. |
| $create_in_db bool | Optional. Whether to insert the post into database. Default false. |
Return Value
(WP_Post)
Post object containing all the default post data as attributes
Function Information
Since Version
2.0.0
Source File
wp-admin/includes/post.php
Advertisement