WordPress.org

Make WordPress Core

Changeset 3181


Ignore:
Timestamp:
11/21/05 08:44:38 (8 years ago)
Author:
ryan
Message:

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

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-admin/inline-uploading.php

    r3152 r3181  
    415415<li<?php echo $current_2; ?>><a href="<?php echo basename(__FILE__); ?>?action=view&amp;post=<?php echo $post; ?>"><?php _e('Attached Images'); ?></a></li> 
    416416<?php } ?> 
     417<?php if ($wpdb->get_var("SELECT count(ID) FROM $wpdb->posts WHERE post_status = 'attachment' AND left(post_mime_type, 5) = 'image'")) { ?> 
    417418<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> 
     419<?php } ?> 
    418420<li> </li> 
    419421<?php if ( $action != 'upload' ) { ?> 
Note: See TracChangeset for help on using the changeset viewer.