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); ?>
その設定または他の方法で利用可能なオプションはありますか?
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; } );