From 32bbded79593f69d8a11574859237e985447585b Mon Sep 17 00:00:00 2001 From: Caleb Burks <19caleb95@gmail.com> Date: Sun, 3 Nov 2019 14:13:06 -0600 Subject: [PATCH] Disallow create_posts for the Contributors CPT --- plugins/wporg-5ftf/includes/contributor.php | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/plugins/wporg-5ftf/includes/contributor.php b/plugins/wporg-5ftf/includes/contributor.php index eddf5ce..3a5ba44 100644 --- a/plugins/wporg-5ftf/includes/contributor.php +++ b/plugins/wporg-5ftf/includes/contributor.php @@ -65,6 +65,10 @@ function register_custom_post_type() { 'exclude_from_search' => true, 'publicly_queryable' => false, 'capability_type' => 'page', + 'capabilities' => array( + 'create_posts' => 'do_not_allow' + ), + 'map_meta_cap' => true, 'show_in_rest' => false, // todo Maybe turn this on later. );