Changeset 48211 for trunk/src/wp-includes/class-wp-customize-manager.php
- Timestamp:
- 06/29/2020 10:31:12 AM (4 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/class-wp-customize-manager.php
r48104 r48211 3140 3140 } 3141 3141 3142 if ( $changeset_post_id && ! current_user_can( get_post_type_object( 'customize_changeset' )->cap->delete_post, $changeset_post_id ) ) { 3143 wp_send_json_error( 3144 array( 3145 'code' => 'changeset_trash_unauthorized', 3146 'message' => __( 'Unable to trash changes.' ), 3147 ) 3148 ); 3142 if ( $changeset_post_id ) { 3143 if ( ! current_user_can( get_post_type_object( 'customize_changeset' )->cap->delete_post, $changeset_post_id ) ) { 3144 wp_send_json_error( 3145 array( 3146 'code' => 'changeset_trash_unauthorized', 3147 'message' => __( 'Unable to trash changes.' ), 3148 ) 3149 ); 3150 } 3151 3152 $lock_user = (int) wp_check_post_lock( $changeset_post_id ); 3153 3154 if ( $lock_user && get_current_user_id() !== $lock_user ) { 3155 wp_send_json_error( 3156 array( 3157 'code' => 'changeset_locked', 3158 'message' => __( 'Changeset is being edited by other user.' ), 3159 'lockUser' => $this->get_lock_user_data( $lock_user ), 3160 ) 3161 ); 3162 } 3149 3163 } 3150 3164
Note: See TracChangeset
for help on using the changeset viewer.