Eine auf WordPress spezialiserte Suchmaschine für Entwickler und Theme-Autoren



wp_calculate_image_srcset_meta ›

Seit4.5.0
Veraltetn/v
apply_filters( 'wp_calculate_image_srcset_meta', $image_meta, $size_array, $image_src, $attachment_id )
Parameter: (4)
  • (array) $image_meta The image meta data as returned by 'wp_get_attachment_metadata()'.
    Erforderlich: Ja
  • (array) $size_array Array of width and height values in pixels (in that order).
    Erforderlich: Ja
  • (string) $image_src The 'src' of the image.
    Erforderlich: Ja
  • (int) $attachment_id The image attachment ID or 0 if not supplied.
    Erforderlich: Ja
Definiert in:
Codex:

Let plugins pre-filter the image meta to be able to fix inconsistencies in the stored data.





Quellcode

$image_meta = apply_filters( 'wp_calculate_image_srcset_meta', $image_meta, $size_array, $image_src, $attachment_id );