Allow + in mime type regex. Props Sam_a. fixes #8991
git-svn-id: http://svn.automattic.com/wordpress/trunk@10502 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
e74d1ca69d
commit
0c81ddb8d2
|
@ -1059,7 +1059,7 @@ function wp_post_mime_type_where($post_mime_types) {
|
||||||
$slashpos = strpos($mime_type, '/');
|
$slashpos = strpos($mime_type, '/');
|
||||||
if ( false !== $slashpos ) {
|
if ( false !== $slashpos ) {
|
||||||
$mime_group = preg_replace('/[^-*.a-zA-Z0-9]/', '', substr($mime_type, 0, $slashpos));
|
$mime_group = preg_replace('/[^-*.a-zA-Z0-9]/', '', substr($mime_type, 0, $slashpos));
|
||||||
$mime_subgroup = preg_replace('/[^-*.a-zA-Z0-9]/', '', substr($mime_type, $slashpos + 1));
|
$mime_subgroup = preg_replace('/[^-*.+a-zA-Z0-9]/', '', substr($mime_type, $slashpos + 1));
|
||||||
if ( empty($mime_subgroup) )
|
if ( empty($mime_subgroup) )
|
||||||
$mime_subgroup = '*';
|
$mime_subgroup = '*';
|
||||||
else
|
else
|
||||||
|
|
Loading…
Reference in New Issue