WordPress禁用古腾堡编辑器

Posted by: Fengjiajun Comments: 0

WordPress禁用古腾堡编辑器

//禁用古腾堡编辑器和小组件
add_filter('use_block_editor_for_post', '__return_false');
add_filter( 'gutenberg_use_widgets_block_editor', '__return_false' );
add_filter( 'use_widgets_block_editor', '__return_false' );
remove_action( 'wp_enqueue_scripts', 'wp_common_block_scripts_and_styles' );