Files
Filename | Hook Type | Line Number | PHP Doc |
---|---|---|---|
wp-includes/media.php | apply_filters | 1423 | /** * Filters an image's 'srcset' sources. * * @since 4.4.0 * * @param array $sources { * One or more arrays of source data to include in the 'srcset'. * * @type array $width { * @type string $url The URL of an image source. * @type string $descriptor The descriptor type used in the image candidate string, * either 'w' or 'x'. * @type int $value The source width if paired with a 'w' descriptor, or a * pixel density value if paired with an 'x' descriptor. * } * } * @param array $size_array { * An array of requested width and height values. * * @type int $0 The width in pixels. * @type int $1 The height in pixels. * } * @param string $image_src The 'src' of the image. * @param array $image_meta The image meta data as returned by 'wp_get_attachment_metadata()'. * @param int $attachment_id Image attachment ID or 0. */ |
Hook Parameters
Parameter Type | Name | Description |
---|---|---|
array | $image_meta | The image meta data as returned by 'wp_get_attachment_metadata()'. |
int[] | $size_arra | y { |
string | $image_src | The 'src' of the image. |
int | $attachment_id | The image attachment ID or 0 if not supplied. |