📜  删除古腾堡 cpt - PHP 代码示例

📅  最后修改于: 2022-03-11 14:53:52.780000             🧑  作者: Mango

代码示例1
add_filter( 'use_block_editor_for_post_type', 'prefix_disable_gutenberg', 10, 2 );
    function prefix_disable_gutenberg( $current_status, $post_type ) {
        // Use your post type key instead of 'page or post'
        if ( in_array( $post_type, array( 'page', 'post' ) ) ) {
            return false;
        }
        return $current_status;
    }