Skip to content

Commit 9ddec38

Browse files
authored
Merge pull request #356 from cloudinary/fix/push-sync
use add_setting_error since it's been connected to the internal notices
2 parents 9c38fa9 + 1c8e166 commit 9ddec38

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

php/settings/class-setting.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -466,7 +466,7 @@ public function prepare_sanitizer( $data ) {
466466
*
467467
* @param mixed $new_value The new setting value.
468468
* @param mixed $current_value The setting current value.
469-
* @param Setting $value The setting object.
469+
* @param Setting $setting The setting object.
470470
*/
471471
$new_value = apply_filters( "cloudinary_settings_save_setting_{$slug}", $new_value, $current_value, $setting );
472472
$new_value = apply_filters( 'cloudinary_settings_save_setting', $new_value, $current_value, $setting );

php/sync/class-sync-queue.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -192,7 +192,7 @@ public function change_setting_state( $new_value, $current_value, $setting ) {
192192
if ( 'on' === $current_value && 'off' === $new_value ) {
193193
if ( $this->is_running() ) {
194194
$this->shutdown_queue( 'queue' );
195-
$setting->add_error_notice( 'disabled_sync', 'Bulk sync has been disabled.', 'warning' );
195+
add_settings_error( $setting->get_option_name(), 'disabled_sync', __( 'Bulk sync has been disabled.', 'cloudinary' ), 'warning' );
196196
}
197197
// Shutdown autosync queue.
198198
$this->shutdown_queue( 'autosync' );

0 commit comments

Comments
 (0)