A WordPress-centric search engine for devs and theme authors



wp_calculate_image_sizes ›

Since4.4.0
Deprecatedn/a
apply_filters( 'wp_calculate_image_sizes', $sizes, $size, $image_src, $image_meta, $attachment_id )
Parameters: (5)
  • (string) $sizes A source size value for use in a 'sizes' attribute.
    Required: Yes
  • (array|string) $size Requested size. Image size or array of width and height values in pixels (in that order).
    Required: Yes
  • (string|null) $image_src The URL to the image file or null.
    Required: Yes
  • (array|null) $image_meta The image meta data as returned by wp_get_attachment_metadata() or null.
    Required: Yes
  • (int) $attachment_id Image attachment ID of the original image or 0.
    Required: Yes
Defined at:
Codex:

Filters the output of 'wp_calculate_image_sizes()'.





Source

return apply_filters( 'wp_calculate_image_sizes', $sizes, $size, $image_src, $image_meta, $attachment_id );