WP hooks navigation: Home/browse • Actions index • Filters index
To save our bandwidth, we show only a snippet of code around each occurence of the hook. View complete file in SVN (without highlighting).
The best way to understand what a hook does is to look at where it occurs in the source code.
do_action( "hook_name" )apply_filters( "hook_name", "what_to_filter" ).Remember, this hook may occur in more than one file. Moreover, the hook's context may change from version to version.
| Line | Code |
|---|---|
| 1718 | * Filters whether to add the `loading` attribute to the specified tag in the specified context. |
| 1719 | * |
| 1720 | * @since 5.5.0 |
| 1721 | * |
| 1722 | * @param bool $default Default value. |
| 1723 | * @param string $tag_name The tag name. |
| 1724 | * @param string $context Additional context, like the current filter name |
| 1725 | * or the function name from where this was called. |
| 1726 | */ |
| 1727 | return (bool) apply_filters( 'wp_lazy_loading_enabled', $default, $tag_name, $context ); |
| 1728 | } |
| 1729 | |
| 1730 | /** |
| 1731 | * Filters specific tags in post content and modifies their markup. |
| 1732 | * |
| 1733 | * Modifies HTML tags in post content to include new browser and HTML technologies |
| 1734 | * that may not have existed at the time of post creation. These modifications currently |
| 1735 | * include adding `srcset`, `sizes`, and `loading` attributes to `img` HTML tags. |
| 1736 | * Future similar optimizations should be added/expected here. |