Make WordPress Core


Ignore:
Timestamp:
09/30/2025 05:05:21 PM (12 months ago)
Author:
desrosj
Message:

Grouped backports for the 5.2 branch.

  • REST API: Increase the specificity of capability checks for collections when the edit context is in use.
  • Menus: Prevent HTML in menu item titles from being rendered unexpectedly.

Merges [60814], [60815], [60816] to the 5.2 branch.

Props andraganescu, desrosj, ehti, hurayraiit, iandunn, joehoyle, johnbillion, jorbin, mnelson4, noisysocks, peterwilsoncc, phillsav, rmccue, timothyblynjacobs, vortfu, westonruter , whyisjake, zieladam.

Location:
branches/5.2
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • branches/5.2

  • branches/5.2/src/wp-includes/rest-api/endpoints/class-wp-rest-posts-controller.php

    r50729 r60834  
    347347
    348348                foreach ( $query_result as $post ) {
    349                         if ( ! $this->check_read_permission( $post ) ) {
     349                        if ( 'edit' === $request['context'] ) {
     350                                $permission = $this->check_update_permission( $post );
     351                        } else {
     352                                $permission = $this->check_read_permission( $post );
     353                        }
     354
     355                        if ( ! $permission ) {
    350356                                continue;
    351357                        }
Note: See TracChangeset for help on using the changeset viewer.