Skip to content

Commit 3d5140c

Browse files
author
Luke Carbis
committed
Merge pull request #827 from xwp/bugfix/issue-308
Logging changes of settings in Customizer
2 parents ef8878f + f025d64 commit 3d5140c

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

connectors/class-connector-settings.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -541,7 +541,7 @@ function( $rule ) use ( $submenu, $record ) {
541541
}
542542

543543
/**
544-
* Trigger this connector from WP CLI, only for known Settings
544+
* Trigger this connector from WP CLI or the Customizer, only for known Settings
545545
*
546546
* @action update_option
547547
*
@@ -550,7 +550,7 @@ function( $rule ) use ( $submenu, $record ) {
550550
* @param mixed $value
551551
*/
552552
public function callback_update_option( $option, $value, $old_value ) {
553-
if ( defined( '\WP_CLI' ) && \WP_CLI && array_key_exists( $option, $this->labels ) ) {
553+
if ( ( defined( '\WP_CLI' ) && \WP_CLI || did_action( 'customize_save' ) ) && array_key_exists( $option, $this->labels ) ) {
554554
$this->callback_updated_option( $option, $value, $old_value );
555555
}
556556
}

0 commit comments

Comments
 (0)