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:

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. Future similar optimizations should be added/expected here.

Related Functions

wp_filter_object_list, wp_filter_post_kses, filter_block_content, the_content_rss, wp_filter_nohtml_kses

Top Google Results

User discussions

wpseek mobile