Make WordPress Core


Ignore:
Timestamp:
01/03/2020 02:26:36 AM (5 years ago)
Author:
SergeyBiryukov
Message:

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.

File:
1 edited

Legend:

Unmodified
Added
Removed
Note: See TracChangeset for help on using the changeset viewer.