wp_filter_content_tags ( $content, $context = null )

  • (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.
  • (string) Converted content with images modified.
Defined at:
Change Log:
  • 5: .


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.

Related Functions

wp_filter_comment, wp_filter_object_list, wp_filter_post_kses, filter_block_content, wp_filter_nohtml_kses

Top Google Results

User discussions

wpseek mobile