apply_filters( ‘wp_mail_embed_args’, array $args )

In this article

Filters the arguments for PHPMailer’s addEmbeddedImage() method.

Parameters

$argsarray
An array of arguments for addEmbeddedImage().
  • path string
    The path to the file.
  • cid string
    The Content-ID of the image. Default: The key in the embeds array.
  • name string
    The filename of the image.
  • encoding string
    The encoding of the image. Default: 'base64'.
  • type string
    The MIME type of the image. Default: empty string, which lets PHPMailer auto-detect.
  • disposition string
    The disposition of the image. Default: 'inline'.

Source

$embed_args = apply_filters(
	'wp_mail_embed_args',
	array(
		'path'        => $embed_path,
		'cid'         => (string) $key,
		'name'        => basename( $embed_path ),
		'encoding'    => 'base64',
		'type'        => '',
		'disposition' => 'inline',
	)
);

Changelog

VersionDescription
6.9.0Introduced.

User Contributed Notes

You must log in before being able to contribute a note or feedback.