wp_lazy_loading_enabled WordPress Filter Hook

The wp_lazy_loading_enabled hook allows you to lazy load images on your WordPress site. This can be useful if you have a lot of images on your site and want to improve performance by loading them only when they're needed.

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.


Top ↑

Source

File: wp-includes/media.php

View on Trac



Top ↑

Changelog

Changelog
VersionDescription
5.5.0Introduced.

The content displayed on this page has been created in part by processing WordPress source code files which are made available under the GPLv2 (or a later version) license by theĀ Free Software Foundation. In addition to this, the content includes user-written examples and information. All material is subject to review and curation by the WPPaste.com community.

Show More