apply_filters( 'wp_lazy_loading_enabled', bool $default , string $tag_name , string $context )
Filters whether to add the loading
attribute to the specified tag in the specified context.
Parameters
-
$default
bool -
Default value.
-
$tag_name
string -
The tag name.
-
$context
string -
Additional context, like the current filter name or the function name from where this was called.
Source
File: wp-includes/media.php
.
View all references
return (bool) apply_filters( 'wp_lazy_loading_enabled', $default, $tag_name, $context );
Changelog
Version | Description |
---|---|
5.5.0 | Introduced. |
User Contributed Notes
You must log in before being able to contribute a note or feedback.
To disable lazy loading use:
Top ↑
Feedback
It seems that it no longer works in wordpress 5.9 — By donpi73 —
It seems that it no longer works in wordpress 5.9 — By donpi73 —
Is there a new filter we can add that works with WP 5.9? This code no longer works — By Why —