Ticket #20672: 20672.2.diff
File 20672.2.diff, 2.0 KB (added by , 13 years ago) |
---|
-
wp-admin/includes/class-wp-media-list-table.php
64 64 if ( !empty($_GET['post_mime_type']) && wp_match_mime_types($mime_type, $_GET['post_mime_type']) ) 65 65 $class = ' class="current"'; 66 66 if ( !empty( $num_posts[$mime_type] ) ) 67 $type_links[$mime_type] = "<a href='upload.php?post_mime_type=$mime_type'$class>". sprintf( translate_nooped_plural( $label[2], $num_posts[$mime_type] ), number_format_i18n( $num_posts[$mime_type] )) . '</a>';67 $type_links[$mime_type] = '<a href="upload.php?post_mime_type=' . urlencode( $mime_type ) . '"' . $class . '>' . sprintf( translate_nooped_plural( $label[2], $num_posts[$mime_type] ), number_format_i18n( $num_posts[$mime_type] )) . '</a>'; 68 68 } 69 69 $type_links['detached'] = '<a href="upload.php?detached=1"' . ( $this->detached ? ' class="current"' : '' ) . '>' . sprintf( _nx( 'Unattached <span class="count">(%s)</span>', 'Unattached <span class="count">(%s)</span>', $total_orphans, 'detached files' ), number_format_i18n( $total_orphans ) ) . '</a>'; 70 70 -
wp-includes/post.php
1938 1938 $real_mime_types = array_map('trim', explode(',', $real_mime_types)); 1939 1939 $wild = '[-._a-z0-9]*'; 1940 1940 foreach ( (array) $wildcard_mime_types as $type ) { 1941 $ type = str_replace('*', $wild, $type);1942 $patternses[1][$type] = "^$ type$";1941 $regex = str_replace( '__wildcard__', $wild, preg_quote( str_replace( '*', '__wildcard__', $type ) ) ); 1942 $patternses[1][$type] = "^$regex$"; 1943 1943 if ( false === strpos($type, '/') ) { 1944 $patternses[2][$type] = "^$ type/";1945 $patternses[3][$type] = $ type;1944 $patternses[2][$type] = "^$regex/"; 1945 $patternses[3][$type] = $regex; 1946 1946 } 1947 1947 } 1948 1948 asort($patternses);