WP Book Style
function wpbook_style($content){
$content = preg_replace('/■(.*\n)/', '<h2>$1</h2>', $content);
$content = preg_replace('/▼(.*) (.*\n)/', '<i>▼$1 $2</i>', $content);
$content = preg_replace('/▼(.*) (.*\n)/', '<i>▼$1 $2</i>', $content);
$content = preg_replace('/\[img (.*)\]/', '<i>画像 $1</i>', $content);
$content = preg_replace('/[(.*)]/', '<var>[$1]</var>', $content);
return $content;
}
な風に、preg_replace 関数を使うだけで変換ができるから、このパターンで。
~~~
あとは、適当にスタイルシートを使って装飾すればOK