From 847f435e9f23a1831491c8998cf5f8feb2853634 Mon Sep 17 00:00:00 2001 From: Ryan Boren Date: Sat, 1 Dec 2012 23:12:30 +0000 Subject: [PATCH] Directly access post_status instead of using get_post_status() when checking for auto-draft status. Attachments with their inherit post_status were getting the auto-draft status of their parent when using get_post_status(). This caused some things to display improperly on the edit attachment page. Props nacin, miqrogroove fixes #22672 git-svn-id: http://core.svn.wordpress.org/trunk@22963 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-admin/edit-form-advanced.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/wp-admin/edit-form-advanced.php b/wp-admin/edit-form-advanced.php index 45139aa9a9..d0b1ed579d 100644 --- a/wp-admin/edit-form-advanced.php +++ b/wp-admin/edit-form-advanced.php @@ -74,7 +74,7 @@ if ( isset($_GET['message']) ) { $notice = false; $form_extra = ''; -if ( 'auto-draft' == get_post_status( $post ) ) { +if ( 'auto-draft' == $post->post_status ) { if ( 'edit' == $action ) $post->post_title = ''; $autosave = false; @@ -340,7 +340,7 @@ if ( !empty($shortlink) ) if ( $post_type_object->public && ! ( 'pending' == get_post_status( $post ) && !current_user_can( $post_type_object->cap->publish_posts ) ) ) { ?>
post_status ) echo $sample_permalink_html; ?>
@@ -368,7 +368,7 @@ if ( post_type_supports($post_type, 'editor') ) {   post_status ) { echo ''; if ( $last_id = get_post_meta($post_ID, '_edit_last', true) ) { $last_user = get_userdata($last_id);