Summery Summery
Convert an HTML string into plain text.
Syntax Syntax
Description Description
This is used by msgHTML(). Note – older versions of this function used a bundled advanced converter which was been removed for license reasons in #232. Example usage:
// Use default conversion
$plain = $mail->html2text($html);
// Use your own custom converter
$plain = $mail->html2text($html, function($html) {
$converter = new MyHtml2text($html);
return $converter->get_text();
});
Parameters Parameters
- $html
-
(Required) The HTML text to convert
- $advanced
-
(Optional) Any boolean value to use the internal converter, or provide your own callable for custom conversion.
Default value: false
Return Return
(string)
Source Source
File: wp-includes/class-phpmailer.php