Allow + in mime type regex. Props Sam_a. fixes #8991
git-svn-id: https://develop.svn.wordpress.org/trunk@10502 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
7d6bf009cd
commit
7bf2f59881
|
@ -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