Skip to content

Commit

Permalink
Allow editing of attachmentts with no titles. Props mdawaffe. fixes #…
Browse files Browse the repository at this point in the history
…6839 for 2.5

git-svn-id: https://core.svn.wordpress.org/branches/2.5@7832 1a063a9b-81f0-0310-95a4-ce76da25c4cd
  • Loading branch information
Ryan Boren committed Apr 25, 2008
1 parent 7569db2 commit 3f7baf7
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion wp-admin/edit-attachment-rows.php
Expand Up @@ -26,6 +26,10 @@
$class = 'alternate' == $class ? '' : 'alternate';
global $current_user;
$post_owner = ( $current_user->ID == $post->post_author ? 'self' : 'other' );
$att_title = get_the_title();
if ( empty($att_title) )
$att_title = __('(no title)');

?>
<tr id='post-<?php echo $id; ?>' class='<?php echo trim( $class . ' author-' . $post_owner . ' status-' . $post->post_status ); ?>' valign="top">

Expand All @@ -50,7 +54,7 @@

case 'media':
?>
<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 />
<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 />
<?php echo strtoupper(preg_replace('/^.*?\.(\w+)$/', '$1', get_attached_file($post->ID))); ?>
<?php do_action('manage_media_media_column', $post->ID); ?>
</td>
Expand Down

0 comments on commit 3f7baf7

Please sign in to comment.