Make WordPress Core


Ignore:
Timestamp:
09/30/2008 09:32:13 PM (16 years ago)
Author:
westi
Message:

Introduce _draft_or_post_title() instead of lots of duplicated (no title) code. Fixes #7801.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-admin/edit-attachment-rows.php

    r9028 r9041  
    3131global $current_user;
    3232$post_owner = ( $current_user->ID == $post->post_author ? 'self' : 'other' );
    33 $att_title = get_the_title();
    34 if ( empty($att_title) )
    35     $att_title = __('(no title)');
     33$att_title = _draft_or_post_title();
    3634
    3735?>
     
    141139
    142140    case 'parent':
    143         $title = __('(no title)'); // override below
    144141        if ( $post->post_parent > 0 ) {
    145142            if ( get_post($post->post_parent) ) {
    146                 $parent_title = get_the_title($post->post_parent);
    147                 if ( !empty($parent_title) )
    148                     $title = $parent_title;
     143                $title =_draft_or_post_title($post->post_parent);
    149144            }
    150145            ?>
Note: See TracChangeset for help on using the changeset viewer.