Nie możesz wybrać więcej, niż 25 tematów Tematy muszą się zaczynać od litery lub cyfry, mogą zawierać myślniki ('-') i mogą mieć do 35 znaków.

34 lines
1.2KB

  1. HTML.DefinitionID
  2. TYPE: string/null
  3. DEFAULT: NULL
  4. VERSION: 2.0.0
  5. --DESCRIPTION--
  6. <p>
  7. Unique identifier for a custom-built HTML definition. If you edit
  8. the raw version of the HTMLDefinition, introducing changes that the
  9. configuration object does not reflect, you must specify this variable.
  10. If you change your custom edits, you should change this directive, or
  11. clear your cache. Example:
  12. </p>
  13. <pre>
  14. $config = HTMLPurifier_Config::createDefault();
  15. $config->set('HTML', 'DefinitionID', '1');
  16. $def = $config->getHTMLDefinition();
  17. $def->addAttribute('a', 'tabindex', 'Number');
  18. </pre>
  19. <p>
  20. In the above example, the configuration is still at the defaults, but
  21. using the advanced API, an extra attribute has been added. The
  22. configuration object normally has no way of knowing that this change
  23. has taken place, so it needs an extra directive: %HTML.DefinitionID.
  24. If someone else attempts to use the default configuration, these two
  25. pieces of code will not clobber each other in the cache, since one has
  26. an extra directive attached to it.
  27. </p>
  28. <p>
  29. You <em>must</em> specify a value to this directive to use the
  30. advanced API features.
  31. </p>
  32. --# vim: et sw=4 sts=4