Skip to content

Commit

Permalink
Merge pull request #1246 from 10up/fix/912
Browse files Browse the repository at this point in the history
Used Distributable PostTypes for Check Post Type Permissions via REST API
  • Loading branch information
jeffpaul authored Jul 29, 2024
2 parents 3a45cb9 + edf0c30 commit 28e6abc
Showing 1 changed file with 1 addition and 6 deletions.
7 changes: 1 addition & 6 deletions includes/rest-api.php
Original file line number Diff line number Diff line change
Expand Up @@ -586,12 +586,7 @@ function distributor_meta() {
* Check user permissions for available post types
*/
function check_post_types_permissions() {
$types = get_post_types(
array(
'show_in_rest' => true,
),
'objects'
);
$types = Utils\distributable_post_types( 'objects' );

$response = array(
'can_get' => array(),
Expand Down

0 comments on commit 28e6abc

Please sign in to comment.