Make WordPress Core


Ignore:
Timestamp:
09/30/2025 05:06:42 PM (8 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/customize/nav-menus.php

    r40098 r60839  
    171171            'id'         => "post-{$post_id}",
    172172            'title'      => 'Post Title',
     173            'original_title'      => 'Post Title',
    173174            'type'       => 'post_type',
    174175            'type_label' => 'Post',
    175176            'object'     => 'post',
    176             'object_id'  => intval( $post_id ),
    177             'url'        => get_permalink( intval( $post_id ) ),
     177            'object_id'  => (int) $post_id,
     178            'url'        => get_permalink( (int) $post_id ),
    178179        );
    179180
     
    198199            'id'         => "post-{$page_id}",
    199200            'title'      => 'Page Title',
     201            'original_title'      => 'Page Title',
    200202            'type'       => 'post_type',
    201203            'type_label' => 'Page',
    202204            'object'     => 'page',
    203             'object_id'  => intval( $page_id ),
    204             'url'        => get_permalink( intval( $page_id ) ),
     205            'object_id'  => (int) $page_id,
     206            'url'        => get_permalink( (int) $page_id ),
    205207        );
    206208
     
    224226            'id'         => "post-{$post_id}",
    225227            'title'      => 'Post Title',
     228            'original_title'      => 'Post Title',
    226229            'type'       => 'post_type',
    227230            'type_label' => 'Post',
    228231            'object'     => 'post',
    229             'object_id'  => intval( $post_id ),
    230             'url'        => get_permalink( intval( $post_id ) ),
     232            'object_id'  => (int) $post_id,
     233            'url'        => get_permalink( (int) $post_id ),
    231234        );
    232235
     
    250253            'id'         => "term-{$term_id}",
    251254            'title'      => 'Term Title',
     255            'original_title'      => 'Term Title',
    252256            'type'       => 'taxonomy',
    253257            'type_label' => 'Category',
    254258            'object'     => 'category',
    255             'object_id'  => intval( $term_id ),
    256             'url'        => get_term_link( intval( $term_id ), 'category' ),
     259            'object_id'  => (int) $term_id,
     260            'url'        => get_term_link( (int) $term_id, 'category' ),
    257261        );
    258262
Note: See TracChangeset for help on using the changeset viewer.