@@ -77,7 +77,7 @@ public function get( $args, $assoc_args ) {
7777 $ value = get_option ( $ key );
7878
7979 if ( false === $ value ) {
80- WP_CLI ::error ( "Could not get ' $ key' option. Does it exist? " );
80+ WP_CLI ::error ( "Could not get ' { $ key} ' option. Does it exist? " );
8181 }
8282
8383 WP_CLI ::print_value ( $ value , $ assoc_args );
@@ -132,9 +132,9 @@ public function add( $args, $assoc_args ) {
132132 }
133133
134134 if ( !add_option ( $ key , $ value , '' , $ autoload ) ) {
135- WP_CLI ::error ( "Could not add option ' $ key'. Does it already exist? " );
135+ WP_CLI ::error ( "Could not add option ' { $ key} '. Does it already exist? " );
136136 } else {
137- WP_CLI ::success ( "Added ' $ key' option. " );
137+ WP_CLI ::success ( "Added ' { $ key} ' option. " );
138138 }
139139 }
140140
@@ -420,12 +420,12 @@ public function update( $args, $assoc_args ) {
420420 $ old_value = sanitize_option ( $ key , get_option ( $ key ) );
421421
422422 if ( $ value === $ old_value && is_null ( $ autoload ) ) {
423- WP_CLI ::success ( "Value passed for ' $ key' option is unchanged. " );
423+ WP_CLI ::success ( "Value passed for ' { $ key} ' option is unchanged. " );
424424 } else {
425425 if ( update_option ( $ key , $ value , $ autoload ) ) {
426- WP_CLI ::success ( "Updated ' $ key' option. " );
426+ WP_CLI ::success ( "Updated ' { $ key} ' option. " );
427427 } else {
428- WP_CLI ::error ( "Could not update option ' $ key'. " );
428+ WP_CLI ::error ( "Could not update option ' { $ key} '. " );
429429 }
430430 }
431431 }
@@ -453,9 +453,9 @@ public function update( $args, $assoc_args ) {
453453 public function delete ( $ args ) {
454454 foreach ( $ args as $ arg ) {
455455 if ( ! delete_option ( $ arg ) ) {
456- WP_CLI ::warning ( "Could not delete ' $ arg' option. Does it exist? " );
456+ WP_CLI ::warning ( "Could not delete ' { $ arg} ' option. Does it exist? " );
457457 } else {
458- WP_CLI ::success ( "Deleted ' $ arg' option. " );
458+ WP_CLI ::success ( "Deleted ' { $ arg} ' option. " );
459459 }
460460 }
461461 }
@@ -577,12 +577,12 @@ public function patch( $args, $assoc_args ) {
577577 $ patched_value = sanitize_option ( $ key , $ traverser ->value () );
578578
579579 if ( $ patched_value === $ old_value ) {
580- WP_CLI ::success ( "Value passed for ' $ key' option is unchanged. " );
580+ WP_CLI ::success ( "Value passed for ' { $ key} ' option is unchanged. " );
581581 } else {
582582 if ( update_option ( $ key , $ patched_value ) ) {
583- WP_CLI ::success ( "Updated ' $ key' option. " );
583+ WP_CLI ::success ( "Updated ' { $ key} ' option. " );
584584 } else {
585- WP_CLI ::error ( "Could not update option ' $ key'. " );
585+ WP_CLI ::error ( "Could not update option ' { $ key} '. " );
586586 }
587587 }
588588 }
0 commit comments