[wp-trac] [WordPress Trac] #32693: wp_enqueue_media() : upload_mimes not filtering
WordPress Trac
noreply at wordpress.org
Thu Jun 18 02:45:12 UTC 2015
#32693: wp_enqueue_media() : upload_mimes not filtering
--------------------------+------------------------------
Reporter: jbonnier | Owner:
Type: defect (bug) | Status: new
Priority: normal | Milestone: Awaiting Review
Component: General | Version: 4.2.2
Severity: normal | Resolution:
Keywords: | Focuses:
--------------------------+------------------------------
Comment (by steve@…):
I tried using
{{{
add_filter('upload_mime_types','remove_pdf');
function remove_pdf( $mimes=array() ) {
unset ( $mimes['pdf'] );
return $mimes;
}
}}}
and was able to upload a PDF.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/32693#comment:1>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list