Make WordPress Core


Ignore:
Timestamp:
09/30/2025 05:03:34 PM (11 months ago)
Author:
desrosj
Message:

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

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

Location:
branches/5.6
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • branches/5.6

  • branches/5.6/src/wp-includes/rest-api/endpoints/class-wp-rest-terms-controller.php

    r54555 r60830  
    327327
    328328                foreach ( $query_result as $term ) {
     329                        if ( 'edit' === $request['context'] && ! current_user_can( 'edit_term', $term->term_id ) ) {
     330                                continue;
     331                        }
     332
    329333                        $data       = $this->prepare_item_for_response( $term, $request );
    330334                        $response[] = $this->prepare_response_for_collection( $data );
Note: See TracChangeset for help on using the changeset viewer.