Skip to content
This repository has been archived by the owner on Dec 16, 2022. It is now read-only.

Commit

Permalink
Update condition for changeset back-compat
Browse files Browse the repository at this point in the history
  • Loading branch information
mohdsayed committed Nov 18, 2016
1 parent 8d8870d commit 04302f3
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions php/class-wp-customize-posts.php
Expand Up @@ -706,14 +706,14 @@ public function filter_customize_save_response_to_export_saved_values( $response
&&
count( array_filter( $response['setting_validities'], 'is_array' ) ) > 0
);
$changeset_status_not_publish = (
! empty( $response['changeset_status'] )
&&
'publish' !== $response['changeset_status']
$changeset_status_publish = (
empty( $response['changeset_status'] ) // Prior to 4.7, this filter only would run on actual saves.
||
'publish' === $response['changeset_status']
);

// Short circuit if there there were invalidities or the changeset status was not publish.
if ( $has_invalidities || $changeset_status_not_publish ) {
if ( $has_invalidities || ! $changeset_status_publish ) {
return $response;
}

Expand Down

0 comments on commit 04302f3

Please sign in to comment.