Commit f75ed123 by o.kimura

ブロックエディタの無効化

parent 07c586c8
Showing with 2 additions and 20 deletions
...@@ -10,7 +10,7 @@ remove_action('wp_head', 'wp_shortlink_wp_head'); ...@@ -10,7 +10,7 @@ remove_action('wp_head', 'wp_shortlink_wp_head');
remove_action('wp_head', 'adjacent_posts_rel_link_wp_head'); remove_action('wp_head', 'adjacent_posts_rel_link_wp_head');
remove_action('wp_head', 'feed_links_extra', 3); remove_action('wp_head', 'feed_links_extra', 3);
add_filter( 'show_admin_bar', '__return_false' ); add_filter( 'show_admin_bar', '__return_false' );
add_filter( 'use_block_editor_for_post', '__return_false' );
/* WordPressで投稿者アーカイブを作らない */ /* WordPressで投稿者アーカイブを作らない */
add_filter( 'author_rewrite_rules', '__return_empty_array' ); add_filter( 'author_rewrite_rules', '__return_empty_array' );
...@@ -385,24 +385,6 @@ function my_tiny_mce_before_init( $init_array ) { ...@@ -385,24 +385,6 @@ function my_tiny_mce_before_init( $init_array ) {
$init_array['extended_valid_elements'] = '*[*]'; $init_array['extended_valid_elements'] = '*[*]';
return $init_array; return $init_array;
} }
add_filter( 'tiny_mce_before_init' , 'my_tiny_mce_before_init' );
// オートフォーマット関連の無効化
add_action('init', function() {
remove_filter('the_title', 'wptexturize');
remove_filter('the_content', 'wptexturize');
remove_filter('the_excerpt', 'wptexturize');
remove_filter('the_title', 'wpautop');
remove_filter('the_content', 'wpautop');
remove_filter('the_excerpt', 'wpautop');
remove_filter('the_editor_content', 'wp_richedit_pre');
});
// オートフォーマット関連の無効化 TinyMCE
add_filter('tiny_mce_before_init', function($init) {
$init['wpautop'] = false;
$init['apply_source_formatting'] = ture;
return $init;
});
?> ?>
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment