mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-06-28 14:20:15 +00:00
Notice fixes from filosofo and Viper007Bond. see #7509
git-svn-id: https://develop.svn.wordpress.org/trunk@9506 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
@@ -184,7 +184,7 @@ $_num_posts = (array) wp_count_attachments();
|
||||
$matches = wp_match_mime_types(array_keys($post_mime_types), array_keys($_num_posts));
|
||||
foreach ( $matches as $type => $reals )
|
||||
foreach ( $reals as $real )
|
||||
$num_posts[$type] += $_num_posts[$real];
|
||||
$num_posts[$type] = ( isset( $num_posts[$type] ) ) ? $num_posts[$type] + $_num_posts[$real] : $_num_posts[$real];
|
||||
|
||||
$class = empty($_GET['post_mime_type']) && ! isset($_GET['detached']) ? ' class="current"' : '';
|
||||
$type_links[] = "<li><a href=\"upload.php\"$class>".__('All Types')."</a>";
|
||||
@@ -194,7 +194,7 @@ foreach ( $post_mime_types as $mime_type => $label ) {
|
||||
if ( !wp_match_mime_types($mime_type, $avail_post_mime_types) )
|
||||
continue;
|
||||
|
||||
if ( wp_match_mime_types($mime_type, $_GET['post_mime_type']) )
|
||||
if ( !empty($_GET['post_mime_type']) && wp_match_mime_types($mime_type, $_GET['post_mime_type']) )
|
||||
$class = ' class="current"';
|
||||
|
||||
$type_links[] = "<li><a href=\"upload.php?post_mime_type=$mime_type\"$class>" .
|
||||
|
||||
Reference in New Issue
Block a user