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:
parent
ab4bbdab05
commit
b851080920
|
@ -414,7 +414,9 @@ form {
|
||||||
<?php if ( $attachments = $wpdb->get_results("SELECT ID FROM $wpdb->posts WHERE post_parent = '$post'") ) { ?>
|
<?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&post=<?php echo $post; ?>"><?php _e('Attached Images'); ?></a></li>
|
<li<?php echo $current_2; ?>><a href="<?php echo basename(__FILE__); ?>?action=view&post=<?php echo $post; ?>"><?php _e('Attached Images'); ?></a></li>
|
||||||
<?php } ?>
|
<?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&post=<?php echo $post; ?>&all=true"><?php _e('All Images'); ?></a></li>
|
<li<?php echo $current_3; ?>><a href="<?php echo basename(__FILE__); ?>?action=view&post=<?php echo $post; ?>&all=true"><?php _e('All Images'); ?></a></li>
|
||||||
|
<?php } ?>
|
||||||
<li> </li>
|
<li> </li>
|
||||||
<?php if ( $action != 'upload' ) { ?>
|
<?php if ( $action != 'upload' ) { ?>
|
||||||
<?php if ( false !== $back ) : ?>
|
<?php if ( false !== $back ) : ?>
|
||||||
|
|
Loading…
Reference in New Issue