[wp-trac] Re: [WordPress Trac] #4615: Allow more open document
formats
WordPress Trac
wp-trac at lists.automattic.com
Thu Jul 12 13:23:07 GMT 2007
#4615: Allow more open document formats
----------------------------+-----------------------------------------------
Reporter: nbachiyski | Owner: anonymous
Type: defect | Status: new
Priority: normal | Milestone: 2.3 (trunk)
Component: Administration | Version:
Severity: normal | Resolution:
Keywords: |
----------------------------+-----------------------------------------------
Comment (by Otto42):
I suggest moving wp_check_filetype() into pluggable.php entirely and
wrapping it with an if ( !function_exists('wp_check_filetype') ) test
entirely.
Why? Well..
While adding new filetypes can be done through a filter, it's somewhat
annoying to have to have a plugin or hack the core or mess with your theme
just to modify your allowed filetypes.
Also, the current method of having it check by extension is kind of
annoying to begin with. It would be nice if we could check by the file
content using fileinfo or something (if you have that PECL extension) or
looking it up in /etc/mime.types (via mime_content_type() ) or some other
way that I cannot describe. Making it pluggable would allow a plugin to
replace that function entirely instead of just adding types.
So while I give a +1 to adding more formats, this patch doesn't go far
enough, IMO. The entire function should be made pluggable.
--
Ticket URL: <http://trac.wordpress.org/ticket/4615#comment:6>
WordPress Trac <http://trac.wordpress.org/>
WordPress blogging software
More information about the wp-trac
mailing list