Don't show the 'All images' tab if no images have been uploaded. Props David House. fixes #1915

git-svn-id: http://svn.automattic.com/wordpress/trunk@3181 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
ryan 2005-11-21 08:44:38 +00:00
parent ab4bbdab05
commit b851080920
1 changed files with 2 additions and 0 deletions

View File

@ -414,7 +414,9 @@ form {
<?php if ( $attachments = $wpdb->get_results("SELECT ID FROM $wpdb->posts WHERE post_parent = '$post'") ) { ?>
<li<?php echo $current_2; ?>><a href="<?php echo basename(__FILE__); ?>?action=view&amp;post=<?php echo $post; ?>"><?php _e('Attached Images'); ?></a></li>
<?php } ?>
<?php if ($wpdb->get_var("SELECT count(ID) FROM $wpdb->posts WHERE post_status = 'attachment' AND left(post_mime_type, 5) = 'image'")) { ?>
<li<?php echo $current_3; ?>><a href="<?php echo basename(__FILE__); ?>?action=view&amp;post=<?php echo $post; ?>&amp;all=true"><?php _e('All Images'); ?></a></li>
<?php } ?>
<li> </li>
<?php if ( $action != 'upload' ) { ?>
<?php if ( false !== $back ) : ?>