wpseek.com
Un motore di ricerca WordPress per sviluppatori e autori di temi



wp_make_content_images_responsive › WordPress Function

Da4.4.0
Deprecato5.5.0
› wp_make_content_images_responsive ( $content )
Parametri:
  • (string) $content The raw post content to be filtered.
    Richiesto: Sì
Vedi:
Ritorna:
  • (string) Converted content with 'srcset' and 'sizes' attributes added to images.
Definito a:
Codex:

Filters 'img' elements in post content to add 'srcset' and 'sizes' attributes.



Sorgenti

function wp_make_content_images_responsive( $content ) {
	_deprecated_function( __FUNCTION__, '5.5.0', 'wp_filter_content_tags()' );

	// This will also add the `loading` attribute to `img` tags, if enabled.
	return wp_filter_content_tags( $content );
}