From dc104d9ab930eb69abc542d6148298dd915b391a Mon Sep 17 00:00:00 2001 From: Konstantin Obenland Date: Thu, 13 Nov 2025 14:26:43 -0600 Subject: [PATCH 1/2] Disable REST API endpoints for internal post types This change disables REST API access for the ap_inbox, ap_outbox, and ap_post custom post types by setting 'show_in_rest' to false. --- includes/class-post-types.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) 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' ), From 05339e100d55c3ba9cd9dec21c56a5a134327a7d Mon Sep 17 00:00:00 2001 From: Automattic Bot Date: Thu, 13 Nov 2025 22:28:50 +0200 Subject: [PATCH 2/2] Add changelog --- .github/changelog/2463-from-description | 4 ++++ 1 file changed, 4 insertions(+) create mode 100644 .github/changelog/2463-from-description 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.