Changeset 42612
- Timestamp:
- 01/29/2018 11:04:22 PM (6 years ago)
- Location:
- trunk/src
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-admin/js/customize-controls.js
r42543 r42612 8209 8209 $( document ).on( 'heartbeat-send.update_lock_notice', function( event, data ) { 8210 8210 data.check_changeset_lock = true; 8211 data.changeset_uuid = api.settings.changeset.uuid; 8211 8212 } ); 8212 8213 -
trunk/src/wp-includes/class-wp-customize-manager.php
r42541 r42612 3205 3205 */ 3206 3206 public function check_changeset_lock_with_heartbeat( $response, $data, $screen_id ) { 3207 if ( array_key_exists( 'check_changeset_lock', $data ) && 'customize' === $screen_id && current_user_can( 'customize' ) && $this->changeset_post_id() ) { 3208 $lock_user_id = wp_check_post_lock( $this->changeset_post_id() ); 3207 if ( isset( $data['changeset_uuid'] ) ) { 3208 $changeset_post_id = $this->find_changeset_post_id( $data['changeset_uuid'] ); 3209 } else { 3210 $changeset_post_id = $this->changeset_post_id(); 3211 } 3212 3213 if ( 3214 array_key_exists( 'check_changeset_lock', $data ) 3215 && 'customize' === $screen_id 3216 && $changeset_post_id 3217 && current_user_can( get_post_type_object( 'customize_changeset' )->cap->edit_post, $changeset_post_id ) 3218 ) { 3219 $lock_user_id = wp_check_post_lock( $changeset_post_id ); 3209 3220 3210 3221 if ( $lock_user_id ) { … … 3213 3224 3214 3225 // Refreshing time will ensure that the user is sitting on customizer and has not closed the customizer tab. 3215 $this->refresh_changeset_lock( $ this->changeset_post_id());3226 $this->refresh_changeset_lock( $changeset_post_id ); 3216 3227 } 3217 3228 }
Note: See TracChangeset
for help on using the changeset viewer.