You are here

private static function mimemail_compress::replace_class_attributes in Mime Mail 7

Replace callback function that matches class attributes.

File

modules/mimemail_compress/mimemail_compress.inc, line 252
Converts CSS styles into inline style attributes.

Class

mimemail_compress
Compresses HTML and CSS into combined message.

Code

private static function replace_class_attributes($m) {
  return (strlen($m[1]) ? $m[1] : '*') . '[contains(concat(" ",normalize-space(@class)," "),concat(" ","' . implode('"," "))][contains(concat(" ",normalize-space(@class)," "),concat(" ","', explode('.', substr($m[2], 1))) . '"," "))]';
}