<?php
if (!defined('IN_OELOVE')) {
    exit('OElove[OEPHP] Access Denied');
}
//农历 宜 转换
function smarty_modifier_nonglisuit($text){
    $new_string = "";
    if (!empty($text)) {
        if ($text == "嫁娶") {
            $new_string .= "<span>♥ 嫁娶 ♥</span>";
        }
        else {
            if (true === XHandle::foundInChar($text, "嫁娶", ".")) {
                $new_string .= "<span>♥ 嫁娶 ♥</span>";
                $text = str_replace("嫁娶", "", $text);
            }
        }
        if (!empty($text)) {
            $arr = explode(".", $text);
            for($ii=0; $ii<count($arr); $ii++) {
                $s = $arr[$ii];
                if (!empty($s)) {
                    $new_string .= "<em>{$s}</em>";
                }
            }
        }
    }
    return $new_string;
}
?>