【问题标题】:Configure or remove an item from tinymce menu bar in wordpress从 wordpress 中的 tinymce 菜单栏中配置或删除项目
【发布时间】:2018-08-09 17:04:06
【问题描述】:

是否可以从 wordpress 可视化编辑器的菜单栏中删除这些项目?

  • 插入阅读更多标签
  • 分页符

我正在使用 tinymce 高级插件。

我已经使用此代码删除格式,但对于这两个我不确定它的关键。与格式不同,它使用 block_formats。

function custom_tinymce_formats( $init ) {
    $block_formats = array(
        'Paragraph=p',
        'Heading 1=h1',
        'Heading 2=h2',
        'Heading 3=h3',
        'Heading 4=h4',
    );

    $init['block_formats'] = implode( ';', $block_formats );
    return $init;
}
add_filter( 'tiny_mce_before_init', 'custom_tinymce_formats' );

希望有人可以帮助我!非常感谢。

【问题讨论】:

    标签: wordpress tinymce


    【解决方案1】:

    我刚刚添加了这段代码:

    $init['removed_menuitems'] = 'wp_page, wp_more';
    

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 2015-01-11
      • 1970-01-01
      • 2017-01-10
      • 1970-01-01
      • 1970-01-01
      • 2012-11-15
      • 1970-01-01
      相关资源
      最近更新 更多