wp_lazy_loading_enabled filter-hook . WP 5.5.0
Filters whether to add the loading attribute to the specified tag in the specified context.
Usage
add_filter( 'wp_lazy_loading_enabled', 'filter_function_name_1605', 10, 3 ); function filter_function_name_1605( $default, $tag_name, $context ){ // filter... return $default; }
- $default(true/false)
- 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.
Changelog
Since 5.5.0 | Introduced. |
Where the hook is called
wp_lazy_loading_enabled
wp-includes/media.php 1727
return (bool) apply_filters( 'wp_lazy_loading_enabled', $default, $tag_name, $context );