WPDev.one
Core Function
View Source on Trac ↗

wp_img_tag_add_loading_attr()

wp_img_tag_add_loading_attr( mixed $image, mixed $context )

Adds `loading` attribute to an `img` HTML tag.

Parameters 2 required

Name / Type Description
$image
string

The HTML `img` tag where the attribute should be added.

Required
$context
string

Additional context to pass to the filters.

Required

Return Value

(string)
Converted `img` tag with `loading` attribute added.

Function Information

Since Version
5.5.0
Source File
wp-includes/deprecated.php
Advertisement