diff --git a/.github/changelog/2463-from-description b/.github/changelog/2463-from-description new file mode 100644 index 000000000..4728bdb4e --- /dev/null +++ b/.github/changelog/2463-from-description @@ -0,0 +1,4 @@ +Significance: patch +Type: fixed + +Disable REST API endpoints for internal post types. diff --git a/includes/class-post-types.php b/includes/class-post-types.php index 64f7af9d9..d834b2080 100644 --- a/includes/class-post-types.php +++ b/includes/class-post-types.php @@ -113,7 +113,7 @@ public static function register_inbox_post_type() { ), 'map_meta_cap' => true, 'public' => false, - 'show_in_rest' => true, + 'show_in_rest' => false, 'rewrite' => false, 'query_var' => false, 'supports' => array( 'title', 'editor', 'author', 'custom-fields' ), @@ -223,7 +223,7 @@ public static function register_outbox_post_type() { ), 'map_meta_cap' => true, 'public' => false, - 'show_in_rest' => true, + 'show_in_rest' => false, 'rewrite' => false, 'query_var' => false, 'supports' => array( 'title', 'editor', 'author', 'custom-fields' ), @@ -350,7 +350,7 @@ public static function register_post_post_type() { ), 'map_meta_cap' => true, 'public' => false, - 'show_in_rest' => true, + 'show_in_rest' => false, 'rewrite' => false, 'query_var' => false, 'supports' => array( 'title', 'editor', 'author', 'custom-fields', 'excerpt', 'comments' ),