Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Projects
None yet
2 participants
@sayedtaqui
Copy link
Collaborator

commented Nov 17, 2016

No description provided.

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

This comment has been minimized.

Copy link
@westonruter

westonruter Nov 17, 2016

Contributor

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

3 checks passed

continuous-integration/travis-ci/pr The Travis CI build passed
Details
continuous-integration/travis-ci/push The Travis CI build passed
Details
coverage/coveralls Coverage remained the same at 94.191%
Details

@westonruter westonruter deleted the quickfix/changeset-issue branch Nov 18, 2016

@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 join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.