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

Prevent sending back DB-persisted setting values in customize_save_response unless changeset is being published #317

Merged
merged 2 commits into from Nov 18, 2016

Conversation

mohdsayed
Copy link
Contributor

No description provided.

);
$changeset_status_not_publish = (
! empty( $response['changeset_status'] )
&&
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For back-compat, I think this conditional needs to be:

$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_publish ) {

@westonruter westonruter added this to the 0.8.3 milestone Nov 18, 2016
@westonruter westonruter merged commit 50fe33b into develop Nov 18, 2016
@westonruter westonruter deleted the quickfix/changeset-issue branch November 18, 2016 05:12
@westonruter westonruter changed the title Add check for changeset status Prevent sending back DB-persisted setting values in customize_save_response unless changeset is being published Nov 24, 2016
@westonruter westonruter changed the title Prevent sending back DB-persisted setting values in customize_save_response unless changeset is being published Prevent sending back DB-persisted setting values in customize_save_response unless changeset is being published Nov 24, 2016
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants