如何在Wordpress编辑器中使用php添加图片?
问题描述:
我使用wordpress主题。该主题在编辑器面板上包含wp_editor
。我的代码是:如何在Wordpress编辑器中使用php添加图片?
<?php
wp_editor('', lovephotoValue, $settings = array(
'quicktags'=>1,
'tinymce'=>1,
'media_buttons'=>0,
'textarea_rows'=>10,
'editor_class'=>"textareastyle"
));
?>
那么,如何可以以编程方式添加一个图像到这个编辑器,当用户打开这个页面,则图像将在编辑器...
谢谢!
答
如果你想使用内置的WordPress的媒体上传media_buttons的价值只是更改为true:
wp_editor('', lovephotoValue, $settings = array(
'quicktags'=>1,
'tinymce'=>1,
'media_buttons'=>true,
'textarea_rows'=>10,
'editor_class'=>"textareastyle"
));