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

Top ↑

See also


Top ↑

Parameters

$id

(int)(Required)


Top ↑

Return

(WP_Post)


Top ↑

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' );
}


Top ↑

Changelog

Changelog
VersionDescription
3.5.0Use get_post()
2.0.0Introduced.

The content displayed on this page has been created in part by processing WordPress source code files which are made available under the GPLv2 (or a later version) license by theĀ Free Software Foundation. In addition to this, the content includes user-written examples and information. All material is subject to review and curation by the WPPaste.com community.

Show More