mirror of
https://github.com/WordPress/WordPress.git
synced 2024-12-23 17:48:01 +01:00
Deprecate get_default_post_to_edit(). Props SergeyBiryukov. fixes #21677
git-svn-id: http://core.svn.wordpress.org/trunk@21800 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
249453b396
commit
d8013dfc0a
@ -974,3 +974,20 @@ function get_post_to_edit( $id ) {
|
|||||||
return get_post( $id, OBJECT, 'edit' );
|
return get_post( $id, OBJECT, 'edit' );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get the default page information to use.
|
||||||
|
*
|
||||||
|
* @since 2.5.0
|
||||||
|
* @deprecated 3.5.0
|
||||||
|
* @deprecated Use get_default_post_to_edit()
|
||||||
|
*
|
||||||
|
* @return WP_Post Post object containing all the default post data as attributes
|
||||||
|
*/
|
||||||
|
function get_default_page_to_edit() {
|
||||||
|
_deprecated_function( __FUNCTION__, '3.5', "get_default_post_to_edit( 'page' )" );
|
||||||
|
|
||||||
|
$page = get_default_post_to_edit();
|
||||||
|
$page->post_type = 'page';
|
||||||
|
return $page;
|
||||||
|
}
|
||||||
|
|
||||||
|
@ -458,19 +458,6 @@ function get_default_post_to_edit( $post_type = 'post', $create_in_db = false )
|
|||||||
return $post;
|
return $post;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* Get the default page information to use.
|
|
||||||
*
|
|
||||||
* @since 2.5.0
|
|
||||||
*
|
|
||||||
* @return WP_Post Post object containing all the default post data as attributes
|
|
||||||
*/
|
|
||||||
function get_default_page_to_edit() {
|
|
||||||
$page = get_default_post_to_edit();
|
|
||||||
$page->post_type = 'page';
|
|
||||||
return $page;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Determine if a post exists based on title, content, and date
|
* Determine if a post exists based on title, content, and date
|
||||||
*
|
*
|
||||||
|
Loading…
Reference in New Issue
Block a user