Make WordPress Core


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

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

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

Location:
branches/4.7
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • branches/4.7

  • branches/4.7/tests/phpunit/tests/rest-api/rest-tags-controller.php

    r40427 r60839  
    10031003    }
    10041004
     1005    /**
     1006     * Callback for map_meta_cap filter to disallow edit_term capability
     1007     *
     1008     * @param array  $caps Required capabilities.
     1009     * @param string $cap  Capability being checked.
     1010     * @return array Modified capabilities.
     1011     */
     1012    public function disallow_edit_term_cap( $caps, $cap ) {
     1013        if ( 'edit_term' === $cap ) {
     1014            return array( 'do_not_allow' );
     1015        }
     1016
     1017        return $caps;
     1018    }
     1019
    10051020    public function tearDown() {
    10061021        _unregister_taxonomy( 'batman' );
Note: See TracChangeset for help on using the changeset viewer.