WordPress.org

Make WordPress Core

Changeset 7831


Ignore:
Timestamp:
04/25/2008 03:28:08 PM (10 years ago)
Author:
ryan
Message:

Allow editing of attachmentts with no titles. Props mdawaffe. fixes #6839 for trunk

File:
1 edited

Legend:

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

    r7543 r7831  
    2727global $current_user;
    2828$post_owner = ( $current_user->ID == $post->post_author ? 'self' : 'other' );
     29$att_title = get_the_title();
     30if ( empty($att_title) )
     31    $att_title = __('(no title)');
     32
    2933?>
    3034    <tr id='post-<?php echo $id; ?>' class='<?php echo trim( $class . ' author-' . $post_owner . ' status-' . $post->post_status ); ?>' valign="top">
     
    5155    case 'media':
    5256        ?>
    53         <td><strong><a href="media.php?action=edit&amp;attachment_id=<?php the_ID(); ?>" title="<?php echo attribute_escape(sprintf(__('Edit "%s"'), get_the_title())); ?>"><?php the_title(); ?></a></strong><br />
     57        <td><strong><a href="media.php?action=edit&amp;attachment_id=<?php the_ID(); ?>" title="<?php echo attribute_escape(sprintf(__('Edit "%s"'), $att_title)); ?>"><?php echo $att_title; ?></a></strong><br />
    5458        <?php echo strtoupper(preg_replace('/^.*?\.(\w+)$/', '$1', get_attached_file($post->ID))); ?>
    5559        <?php do_action('manage_media_media_column', $post->ID); ?>
Note: See TracChangeset for help on using the changeset viewer.