From 46f3985c390df462dcf798641954c4a5b4f693cd Mon Sep 17 00:00:00 2001 From: Ryan Boren Date: Mon, 10 Sep 2012 20:39:45 +0000 Subject: [PATCH] Deprecate get_default_post_to_edit(). Props SergeyBiryukov. fixes #21677 git-svn-id: https://develop.svn.wordpress.org/trunk@21800 602fd350-edb4-49c9-b593-d223f7449a82 --- wp-admin/includes/deprecated.php | 17 +++++++++++++++++ wp-admin/includes/post.php | 13 ------------- 2 files changed, 17 insertions(+), 13 deletions(-) diff --git a/wp-admin/includes/deprecated.php b/wp-admin/includes/deprecated.php index bc49030af6..ff72ffd0be 100644 --- a/wp-admin/includes/deprecated.php +++ b/wp-admin/includes/deprecated.php @@ -974,3 +974,20 @@ function get_post_to_edit( $id ) { 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; +} + diff --git a/wp-admin/includes/post.php b/wp-admin/includes/post.php index a2528c0c0e..130edb6cf1 100644 --- a/wp-admin/includes/post.php +++ b/wp-admin/includes/post.php @@ -458,19 +458,6 @@ function get_default_post_to_edit( $post_type = 'post', $create_in_db = false ) 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 *