file_is_displayable_image
Filter HookDescription
Filters whether the current image is displayable in the browser.Hook Information
File Location |
wp-admin/includes/image.php
View on GitHub
|
Hook Type | Filter |
Line Number | 1112 |
Hook Parameters
Type | Name | Description |
---|---|---|
bool
|
$result
|
Whether the image can be displayed. Default true. |
string
|
$path
|
Path to the image. |
Usage Examples
Basic Usage
<?php
// Hook into file_is_displayable_image
add_filter('file_is_displayable_image', 'my_custom_filter', 10, 2);
function my_custom_filter($result, $path) {
// Your custom filtering logic here
return $result;
}
Source Code Context
wp-admin/includes/image.php:1112
- How this hook is used in WordPress core
<?php
1107 * @since 2.5.0
1108 *
1109 * @param bool $result Whether the image can be displayed. Default true.
1110 * @param string $path Path to the image.
1111 */
1112 return apply_filters( 'file_is_displayable_image', $result, $path );
1113 }
1114
1115 /**
1116 * Loads an image resource for editing.
1117 *
PHP Documentation
<?php
/**
* Filters whether the current image is displayable in the browser.
*
* @since 2.5.0
*
* @param bool $result Whether the image can be displayed. Default true.
* @param string $path Path to the image.
*/
Quick Info
- Hook Type: Filter
- Parameters: 2
- File: wp-admin/includes/image.php
Related Hooks
Related hooks will be displayed here in future updates.