Make WordPress Core


Ignore:
Timestamp:
09/30/2025 05:00:33 PM (10 months ago)
Author:
desrosj
Message:

Grouped backports for the 6.6 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 6.6 branch.

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

Location:
branches/6.6
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • branches/6.6

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

    r58326 r60820  
    385385
    386386                foreach ( $query_result as $post ) {
    387                         if ( ! $this->check_read_permission( $post ) ) {
     387                        if ( 'edit' === $request['context'] ) {
     388                                $permission = $this->check_update_permission( $post );
     389                        } else {
     390                                $permission = $this->check_read_permission( $post );
     391                        }
     392
     393                        if ( ! $permission ) {
    388394                                continue;
    389395                        }
Note: See TracChangeset for help on using the changeset viewer.