Nevar pievienot vairāk kā 25 tēmas Tēmai ir jāsākas ar burtu vai ciparu, tā var saturēt domu zīmes ('-') un var būt līdz 35 simboliem gara.

45 rindas
1.0KB

  1. <?php
  2. /**
  3. * XHTML 1.1 Bi-directional Text Module, defines elements that
  4. * declare directionality of content. Text Extension Module.
  5. */
  6. class HTMLPurifier_HTMLModule_Bdo extends HTMLPurifier_HTMLModule
  7. {
  8. /**
  9. * @type string
  10. */
  11. public $name = 'Bdo';
  12. /**
  13. * @type array
  14. */
  15. public $attr_collections = array(
  16. 'I18N' => array('dir' => false)
  17. );
  18. /**
  19. * @param HTMLPurifier_Config $config
  20. */
  21. public function setup($config)
  22. {
  23. $bdo = $this->addElement(
  24. 'bdo',
  25. 'Inline',
  26. 'Inline',
  27. array('Core', 'Lang'),
  28. array(
  29. 'dir' => 'Enum#ltr,rtl', // required
  30. // The Abstract Module specification has the attribute
  31. // inclusions wrong for bdo: bdo allows Lang
  32. )
  33. );
  34. $bdo->attr_transform_post[] = new HTMLPurifier_AttrTransform_BdoDir();
  35. $this->attr_collections['I18N']['dir'] = 'Enum#ltr,rtl';
  36. }
  37. }
  38. // vim: et sw=4 sts=4