Filters the context in which wp_get_attachment_image() is used.
$contextstringwp-includes/media.php:1115wp_get_attachment_image() * Filters the context in which wp_get_attachment_image() is used. * * @since 6.3.0 * * @param string $context The context. Default 'wp_get_attachment_image'. */ $context = apply_filters( 'wp_get_attachment_image_context', 'wp_get_attachment_image' ); $attr = wp_parse_args( $attr, $default_attr ); // Ensure that the `$width` doesn't overwrite an already valid user-provided width. if ( ! isset( $attr['width'] ) || ! is_numeric( $attr['width'] ) ) { $attr['width'] = $width;Introduced in 6.3.0. Unchanged from 6.7.7 through 7.1.0.
Signature, return type and hooks compared across 5 parsed releases.