Make WordPress Core


Ignore:
Timestamp:
06/29/2020 10:31:12 AM (5 years ago)
Author:
SergeyBiryukov
Message:

Customize: Do not allow changesets to be deleted when someone is editing them.

This makes the behavior consistent with that of locked posts, which can't be deleted via the list tables when another user is editing them.

Props dlh.
Fixes #50501.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-includes/admin-bar.php

    r48109 r48211  
    426426
    427427    // Don't show if the user cannot edit a given customize_changeset post currently being previewed.
    428     if ( is_customize_preview() && $wp_customize->changeset_post_id() && ! current_user_can( get_post_type_object( 'customize_changeset' )->cap->edit_post, $wp_customize->changeset_post_id() ) ) {
     428    if ( is_customize_preview() && $wp_customize->changeset_post_id()
     429        && ! current_user_can( get_post_type_object( 'customize_changeset' )->cap->edit_post, $wp_customize->changeset_post_id() )
     430    ) {
    429431        return;
    430432    }
Note: See TracChangeset for help on using the changeset viewer.