WPDev.one
Core Function
View Source on Trac ↗

wp_lazy_loading_enabled()

wp_lazy_loading_enabled( mixed $tag_name, mixed $context )

Determines whether to add the `loading` attribute to the specified tag in the specified context.

Parameters 2 required

Name / Type Description
$tag_name
string

The tag name.

Required
string

$context Additional context, like the current filter name or the function name from where this was called.

Required

Return Value

(bool)
Whether to add the attribute.

Function Information

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