wp_filter_content_tags
wp_filter_content_tags ( $content, $context = null )
Parameters:- (string) content The HTML content to be filtered.
- (string) context Optional. Additional context to pass to the filters. Defaults to `current_filter()` when not set.
See:Returns:- (string) Converted content with images modified.
Defined at:Change Log: - Introduced in WordPress: 5.5.0
- Deprecated in WordPress: —
Description
Filters specific tags in post content and modifies their markup.Modifies HTML tags in post content to include new browser and HTML technologies
that may not have existed at the time of post creation. These modifications currently
include adding `srcset`, `sizes`, and `loading` attributes to `img` HTML tags, as well
as adding `loading` attributes to `iframe` HTML tags.
Future similar optimizations should be added/expected here.