Changeset 32517
- Timestamp:
- 05/19/2015 08:49:59 PM (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-admin/includes/class-wp-media-list-table.php
r31942 r32517 66 66 $total_orphans = $wpdb->get_var( "SELECT COUNT( * ) FROM $wpdb->posts WHERE post_type = 'attachment' AND post_status != 'trash' AND post_parent < 1" ); 67 67 $matches = wp_match_mime_types(array_keys($post_mime_types), array_keys($_num_posts)); 68 foreach ( $matches as $type => $reals ) 69 foreach ( $reals as $real ) 68 $num_posts = array(); 69 foreach ( $matches as $type => $reals ) { 70 foreach ( $reals as $real ) { 70 71 $num_posts[$type] = ( isset( $num_posts[$type] ) ) ? $num_posts[$type] + $_num_posts[$real] : $_num_posts[$real]; 71 72 } 73 } 72 74 $selected = empty( $_GET['attachment-filter'] ) ? ' selected="selected"' : ''; 73 75 $type_links['all'] = "<option value=''$selected>" . sprintf( _nx( 'All (%s)', 'All (%s)', $_total_posts, 'uploaded files' ), number_format_i18n( $_total_posts ) ) . '</option>';
Note: See TracChangeset
for help on using the changeset viewer.