Warning: This function has been deprecated. Use get_post() instead.
get_post_to_edit() WordPress Function
The get_post_to_edit() function is used to retrieve a post object for the specified post ID. This function is used primarily by the WordPress editing interface to display a post for editing.
get_post_to_edit( int $id ) #
Gets an existing post and format it for editing.
Description
See also
Parameters
- $id
(int)(Required)
Return
(WP_Post)
Source
File: wp-admin/includes/deprecated.php
function get_post_to_edit( $id ) { _deprecated_function( __FUNCTION__, '3.5.0', 'get_post()' ); return get_post( $id, OBJECT, 'edit' ); }
Expand full source codeCollapse full source codeView on TracView on GitHub
Changelog
Version | Description |
---|---|
3.5.0 | Use get_post() |
2.0.0 | Introduced. |