Skip to content

Commit

Permalink
Merge pull request #827 from xwp/bugfix/issue-308
Browse files Browse the repository at this point in the history
Logging changes of settings in Customizer
  • Loading branch information
Luke Carbis committed Mar 10, 2016
2 parents ef8878f + f025d64 commit 3d5140c
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions connectors/class-connector-settings.php
Original file line number Diff line number Diff line change
Expand Up @@ -541,7 +541,7 @@ function( $rule ) use ( $submenu, $record ) {
}

/**
* Trigger this connector from WP CLI, only for known Settings
* Trigger this connector from WP CLI or the Customizer, only for known Settings
*
* @action update_option
*
Expand All @@ -550,7 +550,7 @@ function( $rule ) use ( $submenu, $record ) {
* @param mixed $value
*/
public function callback_update_option( $option, $value, $old_value ) {
if ( defined( '\WP_CLI' ) && \WP_CLI && array_key_exists( $option, $this->labels ) ) {
if ( ( defined( '\WP_CLI' ) && \WP_CLI || did_action( 'customize_save' ) ) && array_key_exists( $option, $this->labels ) ) {
$this->callback_updated_option( $option, $value, $old_value );
}
}
Expand Down

0 comments on commit 3d5140c

Please sign in to comment.