On this page
get_post_to_edit( int $id ): WP_Post
This function has been deprecated. Use get_post() instead.
Gets an existing post and format it for editing.
Description
See also
Parameters
$idint Required
Return
Source
File: wp-admin/includes/deprecated.php. View all references
function get_post_to_edit( $id ) {
_deprecated_function( __FUNCTION__, '3.5.0', 'get_post()' );
return get_post( $id, OBJECT, 'edit' );
}
Related
Uses
| Uses | Description |
|---|---|
| _deprecated_function() wp-includes/functions.php | Marks a function as deprecated and inform when it has been used. |
| get_post() wp-includes/post.php | Retrieves post data given a post ID or post object. |
Changelog
| Version | Description |
|---|---|
| 3.5.0 | Use get_post() |
| 2.0.0 | Introduced. |
© 2003–2022 WordPress Foundation
Licensed under the GNU GPLv2+ License.
https://developer.wordpress.org/reference/functions/get_post_to_edit