wpseek.com
Outil de recherche WordPress pour les développeurs et auteurs de thèmes



wp_make_content_images_responsive › WordPress Function

Depuis4.4.0
Dépréciée5.5.0
wp_make_content_images_responsive ( $content )
Paramètres:
  • (string) $content The raw post content to be filtered.
    Requis: Oui
Voir:
Retourne:
  • (string) Converted content with 'srcset' and 'sizes' attributes added to images.
Défini(e) dans:
Codex:

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



Source

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 );
}