add_action( 'init', $this, 'register_cpt' ); } public function register_cpt(): void { $labels = [ 'name' => __( 'Publications', 'academiccrew' ), 'singular_name' => __( 'Publication', 'academiccrew' ), 'add_new' => __( 'Add New', 'academiccrew' ), 'add_new_item' => __( 'Add New Publication', 'academiccrew' ), 'edit_item' => __( 'Edit Publication', 'academiccrew' ), 'new_item' => __( 'New Publication', 'academiccrew' ), 'search_items' => __( 'Search Publications', 'academiccrew' ), 'not_found' => __( 'No publications found.', 'academiccrew' ), 'not_found_in_trash' => __( 'No publications found in Trash.', 'academiccrew' ), 'all_items' => __( 'All Publications', 'academiccrew' ), 'menu_name' => __( 'Publications', 'academiccrew' ), ]; register_post_type( 'acc_publication', [ 'labels' => $labels, 'public' => false, 'show_ui' => false, 'show_in_menu' => false, 'show_in_rest' => false, 'menu_icon' => 'dashicons-media-document', 'capability_type' => 'post', 'has_archive' => false, 'rewrite' => false, 'supports' => [ 'title', 'custom-fields' ], 'query_var' => false, ] ); } }