0d0919455638e81d43a3d4fff3acb7bf231ccc0e
[yaffs-website] / vendor / ezyang / htmlpurifier / plugins / phorum / migrate.bbcode.php
1 <?php
2
3 /**
4  * This file is responsible for migrating from a specific markup language
5  * like BBCode or Markdown to HTML. WARNING: THIS PROCESS IS NOT REVERSIBLE
6  *
7  * Copy this file to 'migrate.php' and it will automatically work for
8  * BBCode; you may need to tweak this a little to get it to work for other
9  * languages (usually, just replace the include name and the function name).
10  *
11  * If you do NOT want to have any migration performed (for instance, you
12  * are installing the module on a new forum with no posts), simply remove
13  * phorum_htmlpurifier_migrate() function. You still need migrate.php
14  * present, otherwise the module won't work. This ensures that the user
15  * explicitly says, "No, I do not need to migrate."
16  */
17
18 if(!defined("PHORUM")) exit;
19
20 require_once(dirname(__FILE__) . "/../bbcode/bbcode.php");
21
22 /**
23  * 'format' hook style function that will be called to convert
24  * legacy markup into HTML.
25  */
26 function phorum_htmlpurifier_migrate($data)
27 {
28     return phorum_mod_bbcode_format($data); // bbcode's 'format' hook
29 }
30
31 // vim: et sw=4 sts=4