Ticket #20672: 20672.diff
File 20672.diff, 804 bytes (added by , 12 years ago) |
---|
-
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);