【发布时间】:2016-04-15 09:24:57
【问题描述】:
我正在尝试在前端嵌入 wp 编辑器,但在更新 WordPress 4.5 最新版本后它无法正常工作,
$settings = array(
'wpautop' => true,
'postContent' => 'content',
'media_buttons' => false,
'tinymce' => array(
'theme_advanced_buttons1' => 'bold,italic,underline,blockquote,separator,strikethrough,bullist,numlist,justifyleft,justifycenter,justifyright,undo,redo,link,unlink,fullscreen',
'theme_advanced_buttons2' => 'pastetext,pasteword,removeformat,|,charmap,|,outdent,indent,|,undo,redo',
'theme_advanced_buttons3' => '',
'theme_advanced_buttons4' => ''
),
'quicktags' => array(
'buttons' => 'b,i,ul,ol,li,link,close'
)
);
wp_editor( $postContent, 'postContent', $settings );
输出注释。
【问题讨论】:
-
您是否为
true启用了WP_DEBUG标志来检查错误? -
@Milap 感谢您的评论,是的,已经这样做了,但没有显示错误。
-
任何 javascript 错误?请检查js控制台。