我尝试了这个,但它没有显示文本编辑器。那么,我怎样才能在SMOF中获得文本编辑器字段?
$of_options[] = array( "name" => "Legal Services",
"desc" => "Upload Here content",
"id" => "legal",
// Use the shortcodes [site_url] or [site_url_secure] for setting default URLs
"std" => "",
"mod" => "min",
"type" => "text"
);
答案 0 :(得分:0)
请发布更多详情,您使用的是哪个版本?
变化:
"type" => "text"
为:
'type' => 'editor'
答案 1 :(得分:0)
将以下内容添加到第157行开关中的class.options_machine.php
//Wp editor input
case 'editor':
$editor_value = '';
if(isset($value['options']) && is_array($value['options']) ){
$settings = $value['options'];
} else {
$settings = array();
}
$editor_value = stripslashes($smof_data[$value['id']]);
// Turn on the output buffer
ob_start();
// Echo the editor to the buffer
wp_editor( $editor_value, $value['id'], $settings = array() );
// Store the contents of the buffer in a variable
$editor_contents = ob_get_clean();
$output .= $editor_contents;
break;
由于wp_editor()函数作为默认值回应,因此将它放在缓冲区中然后从中获取内容。
这至少是一个开始,