wp_get_attachment_image_context

wp_get_attachment_image_context

Hook Type: filter

See hook in core

Displaying hooks found in version: wordpress-6.9

apply_filters('wp_get_attachment_image_context') is found 1 times:

  • /wp-includes/media.php line 1095
    		 * @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;