나는 wordpress 용 bbcode 플러그인이 있습니다. bbcode 플러그인으로 대체되는 문자
그러나 어떤 이유로
, 내가 게시 할 경우, 나는이 문제를 해결할 수있는 방법 X의 다른 종류입니다[i]v497212he2x2MfMi[/i]
은 "X"문자가 ×
로 출력되고, 같은?
플러그인 코드는 다음과 같습니다 :
class BBCode {
// Plugin initialization
function BBCode() {
// This version only supports WP 2.5+ (learn to upgrade please!)
if (!function_exists('add_shortcode')) return;
// Register the shortcodes
add_shortcode('b' , array(&$this, 'shortcode_bold'));
add_shortcode('i' , array(&$this, 'shortcode_italics'));
}
// No-name attribute fixing
function attributefix($atts = array()) {
if (empty($atts[0])) return $atts;
if (0 !== preg_match('#=("|\')(.*?)("|\')#', $atts[0], $match))
$atts[0] = $match[2];
return $atts;
}
// Bold shortcode
function shortcode_bold($atts = array(), $content = NULL) {
if (NULL === $content) return '';
return '<strong>' . do_shortcode($content) . '</strong>';
}
// Italics shortcode
function shortcode_italics($atts = array(), $content = NULL) {
if (NULL === $content) return '';
return '<em>' . do_shortcode($content) . '</em>';
}
}
// Start this plugin once all other plugins are fully loaded
add_action('plugins_loaded', create_function('', 'global $BBCode; $BBCode = new BBCode();'));
오류가있는 데이터를 좀 더 제공 할 수 있습니까? –
제공 한 BBCode 클래스가 예상대로 작동합니다. 문제는 다른 곳에서 발생하고 있습니다. – dossy