函数原型
get_post_to_edit( int $id ): WP_Post
函数描述
Gets an existing post and format it for editing.
是否弃用
Warning: This function has been deprecated. Use get_post() instead.
函数参数
-
$id
int
Required
函数返回值
WP_Post
函数位置
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' );
}
源码链接
变更日志
| Version | Description |
|---|---|
| 3.5.0 | Use get_post() |
| 2.0.0 | Introduced. |

