mirror of
https://github.com/WordPress/five-for-the-future.git
synced 2025-04-18 17:33:43 +03:00
Disallow create_posts for the Pledges and Contributors (#78)
Pledges and contributors should not be creatable from the normal WP UI "Add New". Fixes #77 Props icaleb
This commit is contained in:
parent
11b9bf3604
commit
1576a18d24
|
@ -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.
|
||||
);
|
||||
|
||||
|
|
|
@ -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.
|
||||
);
|
||||
|
||||
|
|
Loading…
Reference in a new issue