[ Index ] |
PHP Cross Reference of vtigercrm-6.1.0 |
[Summary view] [Print] [Text view]
1 <?php 2 3 /** 4 * Post-transform that copies lang's value to xml:lang (and vice-versa) 5 * @note Theoretically speaking, this could be a pre-transform, but putting 6 * post is more efficient. 7 */ 8 class HTMLPurifier_AttrTransform_Lang extends HTMLPurifier_AttrTransform 9 { 10 11 public function transform($attr, $config, $context) { 12 13 $lang = isset($attr['lang']) ? $attr['lang'] : false; 14 $xml_lang = isset($attr['xml:lang']) ? $attr['xml:lang'] : false; 15 16 if ($lang !== false && $xml_lang === false) { 17 $attr['xml:lang'] = $lang; 18 } elseif ($xml_lang !== false) { 19 $attr['lang'] = $xml_lang; 20 } 21 22 return $attr; 23 24 } 25 26 } 27 28 // vim: et sw=4 sts=4
title
Description
Body
title
Description
Body
title
Description
Body
title
Body
Generated: Fri Nov 28 20:08:37 2014 | Cross-referenced by PHPXref 0.7.1 |