Changeset 42623
- Timestamp:
- 01/30/2018 03:23:39 PM (7 years ago)
- Location:
- branches/4.9
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/4.9
-
branches/4.9/src/wp-admin/js/customize-controls.js
r42544 r42623 8241 8241 $( document ).on( 'heartbeat-send.update_lock_notice', function( event, data ) { 8242 8242 data.check_changeset_lock = true; 8243 data.changeset_uuid = api.settings.changeset.uuid; 8243 8244 } ); 8244 8245 -
branches/4.9/src/wp-includes/class-wp-customize-manager.php
r42620 r42623 3171 3171 */ 3172 3172 public function check_changeset_lock_with_heartbeat( $response, $data, $screen_id ) { 3173 if ( array_key_exists( 'check_changeset_lock', $data ) && 'customize' === $screen_id && current_user_can( 'customize' ) && $this->changeset_post_id() ) { 3174 $lock_user_id = wp_check_post_lock( $this->changeset_post_id() ); 3173 if ( isset( $data['changeset_uuid'] ) ) { 3174 $changeset_post_id = $this->find_changeset_post_id( $data['changeset_uuid'] ); 3175 } else { 3176 $changeset_post_id = $this->changeset_post_id(); 3177 } 3178 3179 if ( 3180 array_key_exists( 'check_changeset_lock', $data ) 3181 && 'customize' === $screen_id 3182 && $changeset_post_id 3183 && current_user_can( get_post_type_object( 'customize_changeset' )->cap->edit_post, $changeset_post_id ) 3184 ) { 3185 $lock_user_id = wp_check_post_lock( $changeset_post_id ); 3175 3186 3176 3187 if ( $lock_user_id ) { … … 3179 3190 3180 3191 // Refreshing time will ensure that the user is sitting on customizer and has not closed the customizer tab. 3181 $this->refresh_changeset_lock( $ this->changeset_post_id());3192 $this->refresh_changeset_lock( $changeset_post_id ); 3182 3193 } 3183 3194 }
Note: See TracChangeset
for help on using the changeset viewer.