Skip to content
Commit bc0f686e authored by Sergey Biryukov's avatar Sergey Biryukov
Browse files

REST API: Synchronize permission checks in `::get_items_permissions_check()`...

REST API: Synchronize permission checks in `::get_items_permissions_check()` methods for post types, post statuses, and users:

* Only query post types with `'show_in_rest' => true` instead of looping over all post types and checking the `show_in_rest` property separately.
* Return from the `foreach()` loop as soon as the permission check succeeded.

Props pbiron, TimothyBlynJacobs, SergeyBiryukov.
Fixes #49118.
Built from https://develop.svn.wordpress.org/trunk@47034


git-svn-id: https://core.svn.wordpress.org/trunk@46834 1a063a9b-81f0-0310-95a4-ce76da25c4cd
parent 28271336
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment