Skip to main content
10 votes
Accepted

How to assign multiple file-mime-types to extension?

Note the stricter mime type check since WP 5.0.1 where the file content and file extension must match. See e.g. this recent question on the vtt file type. Secondary mime type for a given file ...
birgire's user avatar
  • 67.8k
3 votes

How to assign multiple file-mime-types to extension?

A little improved birgire's answer. Had to add multiple mime types for svg, but because svg is forbidden by default, had to add dynamic filter to upload_mimes: class Multiple_Mimes { public ...
Serhiy Zaharchenko's user avatar
2 votes

PHP - Unexpected character in input: '' (ASCII=20) state=0

In your code, you're doing this: $template_file_name = require_once ( get_template_directory() . '/template.docx' ); ...but that's not how require_once (or require) works. require_once will load the ...
Pat J's user avatar
  • 12.3k
1 vote
Accepted

Can a manually uploaded plugin be made to track updates from the WordPress.org plugin directory?

As long as everything was made according to WP best practices all your manually installed versions will update the same as the ones installed from wordpress.org. The updater looks at many things to ...
Justin Waulters's user avatar
1 vote

Can a manually uploaded plugin be made to track updates from the WordPress.org plugin directory?

There is a way to have a privately-hosted plugin folder that will get updated via the normal Admin, Updates process. It's a bit complex to set up, but I have done it. The info is here: https://github....
Rick Hellewell's user avatar

Only top scored, non community-wiki answers of a minimum length are eligible