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.


Top ↑

Source

File: wp-admin/includes/image.php

View on Trac



Top ↑

Changelog

Changelog
VersionDescription
2.5.0Introduced.

The content displayed on this page has been created in part by processing WordPress source code files which are made available under the GPLv2 (or a later version) license by theĀ Free Software Foundation. In addition to this, the content includes user-written examples and information. All material is subject to review and curation by the WPPaste.com community.