Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
如何使 wordpress 编辑器像只读输入一样只读。我正在使用以下代码在页面中显示编辑器
<?php $args= array( 'quicktags' => false, 'media_buttons' => false ); wp_editor( wpautop(stripslashes($my_text)), "my_text", $args); ?>
其设置或任何其他方法中有任何可用选项吗?
use 可以tiny_mce_before_init用来修改微小的 mce 参数以将其设置为只读
tiny_mce_before_init
add_filter( 'tiny_mce_before_init', function( $args ) { if ( 1 == 1 ) $args['readonly'] = 1; return $args; } );