Improvements: file extensions & contents
-
Thanks for this pretty nice plugin, I have a few suggestions for you based on some usage.
- I’d replace line 370
file_get_contents
withwp_remote_fopen
this will help w/ servers that don’t allow forallow_url_fopen
open to be set. - On line 480 you’re limiting the file extensions to 3 characters
preg_match_all('/'.$base_uploads_url.'\/.*?\.[a-z]{3}+/i', $attachment, $attachments);
the problem with this is that it excludes document types like docx, pptx, xlsx and jpeg which will invalidate theverify_exists()
check you have running on line 492 because pptx will then become ppt. So if just replace at a minimum the{3}
with a{3,4}
things should be golden again. - Allow us to extend
get_available_content_types()
by applying it to a filter/hook. That way we can add other MIME types that you don’t currently have in the list.
https://www.ads-software.com/plugins/rackspace-cloud-files-cdn/
- I’d replace line 370
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
- The topic ‘Improvements: file extensions & contents’ is closed to new replies.