/wp-content/plugins/yet-another-photoblog/lib/Savant2-2.4.3/Savant2/tests/5_filters.php

https://github.com/Mercedes/ratonesytortillas · PHP · 42 lines · 19 code · 12 blank · 11 comment · 0 complexity · a88c02cfe94eb590e231ab5cfc873a3d MD5 · raw file

  1. <?php
  2. /**
  3. *
  4. * Tests filters and plugins
  5. *
  6. * @version $Id: 5_filters.php,v 1.1 2004/10/04 01:52:24 pmjones Exp $
  7. *
  8. */
  9. error_reporting(E_ALL);
  10. require_once 'Savant2.php';
  11. $conf = array(
  12. 'template_path' => 'templates',
  13. 'resource_path' => 'resources'
  14. );
  15. $savant =& new Savant2($conf);
  16. // set up filters
  17. $savant->loadFilter('colorizeCode');
  18. $savant->loadFilter('trimwhitespace');
  19. $savant->loadFilter('fester', null, true);
  20. // run through the template
  21. $savant->display('filters.tpl.php');
  22. // do it again to test object persistence
  23. $savant->display('filters.tpl.php');
  24. // do it again to test object persistence
  25. $savant->display('filters.tpl.php');
  26. echo "<hr />\n";
  27. echo "<pre>";
  28. print_r($savant);
  29. echo "</pre>";
  30. ?>