Menu Adam R Brown

WP hooks navigation: Home/browseActions indexFilters index

Source View: wp_lazy_loading_enabled

To save our bandwidth, we show only a snippet of code around each occurence of the hook. View complete file in SVN (without highlighting).

Understanding Source Code

The best way to understand what a hook does is to look at where it occurs in the source code.

Remember, this hook may occur in more than one file. Moreover, the hook's context may change from version to version.

Source View

Line Code
1737       * Filters whether to add the `loading` attribute to the specified tag in the specified context.
1738       *
1739       * @since 5.5.0
1740       *
1741       * @param bool   $default  Default value.
1742       * @param string $tag_name The tag name.
1743       * @param string $context  Additional context, like the current filter name
1744       *                         or the function name from where this was called.
1745       */
1746      return (bool) apply_filters( 'wp_lazy_loading_enabled', $default, $tag_name, $context );
1747 }
1748
1749 /**
1750  * Filters specific tags in post content and modifies their markup.
1751  *
1752  * Modifies HTML tags in post content to include new browser and HTML technologies
1753  * that may not have existed at the time of post creation. These modifications currently
1754  * include adding `srcset`, `sizes`, and `loading` attributes to `img` HTML tags, as well
1755  * as adding `loading` attributes to `iframe` HTML tags.