How to disable block in custom post type? - Wordpress

Viewed 33

I create custom post type for mailing system in Wordpress. But in my custom post type have other plugin block, and I want to disable it. How to do it?

the code:

 static function register_menu_page(){
    if(is_plugin_active('edupac-mail/edupac-mail.php')){
        register_post_type('newsletter', array(
            'show_in_rest' => true,
            'supports' => array('title', 'editor'),
            'public' => true,
            'labels' => array(
                'name' => 'Mail',
                'add_new_item' => 'Add New Mail',
                'edit_item' => 'Edit Mail',
                'all_item' => 'All Mail'
            ),
            'menu_icon' => 'dashicons-email-alt'

        ));
    }
}

enter image description here

0 Answers
Related