Overwrite the upload_files
capability.
Description
When a user requests to upload some files, this plugin will verify his/her capability upload_files
if you select “Verify capability and MIME type” as “Prevent malicious file uploading”. But some plugins and themes which support file uploading would tend to define their own capability, may be for the security reason.
In this case, you should overwrite the slug of capability according to the plugin or theme you are employing.
Parameters
- Bool $capability
Current user has the capabilityupload_files
or not.
Use case
When a user has own role and capability (e.g. attach_files
), overwrite the original one.
NOTE: When you select
"mu-plugins" (ip-location-block-mu.php)
as Validation timing , you should put your code snippet into drop-in.php
in Geolocation API folder instead of functions.php
. See My custom functions in “functions.php” doesn’t work. in FAQ for detail. Since
0.3.0.4