Filters an img tag within the content for a given context.
$filtered_imagestring$contextstring$attachment_idintwp-includes/media.php:2072wp_filter_content_tags() * @since 6.0.0 * * @param string $filtered_image Full img tag with attributes that will replace the source img tag. * @param string $context Additional context, like the current filter name or the function name from where this was called. * @param int $attachment_id The image attachment ID. May be 0 in case the image is not an attachment. */ $filtered_image = apply_filters( 'wp_content_img_tag', $filtered_image, $context, $attachment_id ); if ( $filtered_image !== $match[0] ) { $content = str_replace( $match[0], $filtered_image, $content ); } /*Introduced in 6.0.0. Unchanged from 6.7.7 through 7.1.0.
Signature, return type and hooks compared across 5 parsed releases.