Gdn_Email::getTextVersion PHP Method

getTextVersion() public static method

public static getTextVersion ( $template ) : boolean | mixed | string
$template
return boolean | mixed | string
    public static function getTextVersion($template)
    {
        if (stristr($template, '<!-- //TEXT VERSION FOLLOWS//')) {
            $emailParts = explode('<!-- //TEXT VERSION FOLLOWS//', $template);
            $textVersion = array_pop($emailParts);
            $textVersion = trim(strip_tags(preg_replace('/<(head|title|style|script)[^>]*>.*?<\\/\\1>/s', '', $textVersion)));
            return $textVersion;
        }
        return false;
    }