Make module compatible with Phorum 5.2.6. Changes:
[htmlpurifier.git] / plugins / phorum / migrate.bbcode.php
blob801808761050ca25efc3ae73dff64ce2d2da312d
1 <?php
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).
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.
17 if(!defined("PHORUM")) exit;
19 require_once(dirname(__FILE__) . "/../bbcode/bbcode.php");
21 /**
22 * 'format' hook style function that will be called to convert
23 * legacy markup into HTML.
25 function phorum_htmlpurifier_migrate($data) {
26 return phorum_mod_bbcode_format($data); // bbcode's 'format' hook