WordPress.org

Make WordPress Core

Changeset 22963


Ignore:
Timestamp:
12/01/2012 11:12:30 PM (5 years ago)
Author:
ryan
Message:

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

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-admin/edit-form-advanced.php

    r22925 r22963  
    7575$notice = false;
    7676$form_extra = '';
    77 if ( 'auto-draft' == get_post_status( $post ) ) {
     77if ( 'auto-draft' == $post->post_status ) {
    7878    if ( 'edit' == $action )
    7979        $post->post_title = '';
     
    341341    <div id="edit-slug-box" class="hide-if-no-js">
    342342    <?php
    343         if ( $sample_permalink_html && 'auto-draft' != get_post_status( $post ) )
     343        if ( $sample_permalink_html && 'auto-draft' != $post->post_status )
    344344            echo $sample_permalink_html;
    345345    ?>
     
    369369    <span class="autosave-message">&nbsp;</span>
    370370<?php
    371     if ( 'auto-draft' != get_post_status( $post ) ) {
     371    if ( 'auto-draft' != $post->post_status ) {
    372372        echo '<span id="last-edit">';
    373373        if ( $last_id = get_post_meta($post_ID, '_edit_last', true) ) {
Note: See TracChangeset for help on using the changeset viewer.