file_is_displayable_image WordPress Filter Hook
The file_is_displayable_image Wordpress hook is used to determine whether or not a given file is a displayable image. This can be useful for allowing only certain types of images to be uploaded to a site, or for displaying a message to the user if an image is not displayable.
apply_filters( 'file_is_displayable_image', bool $result , string $path ) #
Filters whether the current image is displayable in the browser.
Parameters
- $result
(bool)Whether the image can be displayed. Default true.
- $path
(string)Path to the image.
Source
Changelog
Version | Description |
---|---|
2.5.0 | Introduced. |