wc_get_attachment_image_attributes( array $attr )
Get attachment image attributes.
Description Description
Parameters Parameters
- $attr
-
(Required) Image attributes.
Return Return
(array)
Source Source
File: includes/wc-product-functions.php
function wc_get_attachment_image_attributes( $attr ) { if ( isset( $attr['src'] ) && strstr( $attr['src'], 'woocommerce_uploads/' ) ) { $attr['src'] = wc_placeholder_img_src(); if ( isset( $attr['srcset'] ) ) { $attr['srcset'] = ''; } } return $attr; }