Make WordPress Core


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

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

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

Location:
branches/5.0
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • branches/5.0

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

    r54571 r60836  
    319319
    320320                foreach ( $query_result as $term ) {
     321                        if ( 'edit' === $request['context'] && ! current_user_can( 'edit_term', $term->term_id ) ) {
     322                                continue;
     323                        }
    321324                        $data = $this->prepare_item_for_response( $term, $request );
    322325                        $response[] = $this->prepare_response_for_collection( $data );
Note: See TracChangeset for help on using the changeset viewer.