Skip to content

Commit 1710b06

Browse files
authored
Disable REST API endpoints for internal post types (#2463)
1 parent 7388765 commit 1710b06

File tree

2 files changed

+7
-3
lines changed

2 files changed

+7
-3
lines changed
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
Significance: patch
2+
Type: fixed
3+
4+
Disable REST API endpoints for internal post types.

includes/class-post-types.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,7 @@ public static function register_inbox_post_type() {
113113
),
114114
'map_meta_cap' => true,
115115
'public' => false,
116-
'show_in_rest' => true,
116+
'show_in_rest' => false,
117117
'rewrite' => false,
118118
'query_var' => false,
119119
'supports' => array( 'title', 'editor', 'author', 'custom-fields' ),
@@ -223,7 +223,7 @@ public static function register_outbox_post_type() {
223223
),
224224
'map_meta_cap' => true,
225225
'public' => false,
226-
'show_in_rest' => true,
226+
'show_in_rest' => false,
227227
'rewrite' => false,
228228
'query_var' => false,
229229
'supports' => array( 'title', 'editor', 'author', 'custom-fields' ),
@@ -350,7 +350,7 @@ public static function register_post_post_type() {
350350
),
351351
'map_meta_cap' => true,
352352
'public' => false,
353-
'show_in_rest' => true,
353+
'show_in_rest' => false,
354354
'rewrite' => false,
355355
'query_var' => false,
356356
'supports' => array( 'title', 'editor', 'author', 'custom-fields', 'excerpt', 'comments' ),

0 commit comments

Comments
 (0)