我正在使用bbPress 2x并修改插件,以使用新的wp\\U编辑器代替文本区域来添加新主题和回复。这部分做得很好。
当一个人点击编辑某个主题或回复时,我就陷入了困境。编辑器中未显示帖子内容。
我可能只是错过了一些非常愚蠢的东西,希望有人能插话,告诉我如何修复这最后一块。
以下是我正在使用的内容:
$tabindex = bbp_get_tab_index();
$settings = array(
\'wpautop\' => true,
\'media_buttons\' => true,
\'editor_class\' => \'tumble\',
\'tabindex\' => $tabindex
);
wp_editor( \'\', \'bbp_topic_content\', $settings );
谢谢
EDIT
刚刚得到我问题的答案,效果很好感谢发送至:http://soderlind.no/archives/2011/09/25/front-end-editor-in-wordpress-3-3/#comment-207831
$post = get_post($post_id, \'OBJECT\');
wp_editor(esc_html($post->post_content), \'textarea01\', $settings);