Make WordPress Core

Changeset 42542


Ignore:
Timestamp:
01/22/2018 06:50:45 AM (7 years ago)
Author:
westonruter
Message:

Customize: Prevent frontend previewing from causing a customization lock on the changeset.

Props dlh.
Amends [41839].
See #42024.
Fixes #42975 for 4.9 branch.

Location:
branches/4.9
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • branches/4.9

  • branches/4.9/src/wp-includes/class-wp-customize-manager.php

    r42539 r42542  
    608608     *
    609609     * @since 4.9.0
     610     * @global string $pagenow
    610611     */
    611612    public function establish_loaded_changeset() {
     613        global $pagenow;
     614
    612615        if ( empty( $this->_changeset_uuid ) ) {
    613616            $changeset_uuid = null;
     
    636639        }
    637640
    638         $this->set_changeset_lock( $this->changeset_post_id() );
     641        if ( is_admin() && 'customize.php' === $pagenow ) {
     642            $this->set_changeset_lock( $this->changeset_post_id() );
     643        }
    639644    }
    640645
Note: See TracChangeset for help on using the changeset viewer.