From 72972951b3857a73fb3fb76b3a7acb6d4592964d Mon Sep 17 00:00:00 2001 From: Caleb Burks <19caleb95@gmail.com> Date: Sun, 3 Nov 2019 13:40:34 -0600 Subject: [PATCH] Disallow create_posts for the Pledges CPT --- plugins/wporg-5ftf/includes/pledge.php | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/plugins/wporg-5ftf/includes/pledge.php b/plugins/wporg-5ftf/includes/pledge.php index 86c3e3e..45d19d0 100755 --- a/plugins/wporg-5ftf/includes/pledge.php +++ b/plugins/wporg-5ftf/includes/pledge.php @@ -94,6 +94,10 @@ function register_custom_post_type() { 'exclude_from_search' => true, 'publicly_queryable' => true, 'capability_type' => 'page', + 'capabilities' => array( + 'create_posts' => 'do_not_allow' + ), + 'map_meta_cap' => true, 'show_in_rest' => false, // todo Maybe turn this on later. );