Wordpress 如何将图像\u发送到\u编辑器过滤器添加到特定的wp\u编辑器实例

Wordpress 如何将图像\u发送到\u编辑器过滤器添加到特定的wp\u编辑器实例,wordpress,plugins,add-filter,wp-editor,Wordpress,Plugins,Add Filter,Wp Editor,我想将过滤器添加到metabox中的自定义wp_编辑器中。有没有办法获取编辑器id,使其不会应用于所有编辑器?谢谢 $args = array( 'quicktags' => true, 'media_buttons' => true, 'tinymce' => array( 'toolbar1' => 'p123553_mce_button_headings,p123553

我想将过滤器添加到metabox中的自定义wp_编辑器中。有没有办法获取编辑器id,使其不会应用于所有编辑器?谢谢

    $args = array(
         'quicktags' => true,
         'media_buttons' => true,
           'tinymce' => array(
                'toolbar1' => 'p123553_mce_button_headings,p123553_mce_button_quotes,',
                'toolbar2' => false,
                'plugins' => '',
              ),
            );
    wp_editor('This is the default text!', 'p123553', $args);


public function p123553_filter_image_send_to_editor($content)
{
    $content .= $editor_id.'<p>Unicorns are awesome.</p>';

    return $content;
}


add_filter('image_send_to_editor',  'p123553_filter_image_send_to_editor');
$args=array(
“quicktags”=>true,
“媒体按钮”=>正确,
“tinymce”=>数组(
“工具栏1”=>“p123553按钮标题,p123553按钮引号,”,
'toolbar2'=>false,
'插件'=>'',
),
);
wp_编辑器('这是默认文本!','p123553',$args);
公共函数p123553_过滤器_图像_发送_至_编辑器($content)
{
$content.=$editor_id.“独角兽太棒了。

”; 返回$content; } 添加_过滤器(“图像_发送_至_编辑器”、“p123553_过滤器_图像_发送_至_编辑器”);
我创建了一个自定义wp\U编辑器。wp_editor('这是默认文本!','ia_designer_mce_editor',$args);很想知道。但我仍然无法在
图像发送到编辑器
过滤器中获取
$editor\u id
,以便指定要使用哪个wp\u编辑器。我编辑了问题并添加了用于创建编辑器的代码
image\u send\u to\u editor
是过滤器的名称(选项表中不存在)。过滤器工作正常。它会更改“插入媒体”窗口中插入图像html的输出。“自定义”编辑器是一个普通的wp_编辑器,加载在帖子的元框中。是的,我知道,谢谢…请尝试在数据库选项表中找到
p123553
custom editor(ID)的正确关联键…有了这些信息,很容易在函数中创建条件。很抱歉,拼写错误。这里是查询->
SELECT*FROM wp\u options,其中option\u name=p123553
我已经创建了一个自定义wp\u编辑器。wp_editor('这是默认文本!','ia_designer_mce_editor',$args);很想知道。但我仍然无法在
图像发送到编辑器
过滤器中获取
$editor\u id
,以便指定要使用哪个wp\u编辑器。我编辑了问题并添加了用于创建编辑器的代码
image\u send\u to\u editor
是过滤器的名称(选项表中不存在)。过滤器工作正常。它会更改“插入媒体”窗口中插入图像html的输出。“自定义”编辑器是一个普通的wp_编辑器,加载在帖子的元框中。是的,我知道,谢谢…请尝试在数据库选项表中找到
p123553
custom editor(ID)的正确关联键…有了这些信息,很容易在函数中创建条件。很抱歉,拼写错误。以下是查询->
SELECT*FROM wp\u options,其中option\u name=p123553