From a4c746b5e4b805db60ade76ebb0e48fd0d56e17c Mon Sep 17 00:00:00 2001 From: Steve Henty Date: Tue, 13 Nov 2018 14:48:18 +0100 Subject: [PATCH 1/2] Fix field property updates --- includes/class-gf-cli-form-field.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/includes/class-gf-cli-form-field.php b/includes/class-gf-cli-form-field.php index ded5355..28edb36 100644 --- a/includes/class-gf-cli-form-field.php +++ b/includes/class-gf-cli-form-field.php @@ -228,7 +228,7 @@ public function field_list( $args, $assoc_args ) { * * : The field ID * - * [--=] + * [--=] * : The field properties to update * * [--field-json=] @@ -238,7 +238,7 @@ public function field_list( $args, $assoc_args ) { * * wp gf update 1 2 --type='text' --label='My Field' * - * @synopsis [--=] [--field-json=] + * @synopsis [--=] [--field-json=] */ public function update( $args, $assoc_args ) { @@ -289,6 +289,7 @@ public function update( $args, $assoc_args ) { $field['label'] = __( 'Untitled', 'gravityforms' ); } } else { + // Get the property/value for the update data foreach ( $assoc_args as $field_property => $value ) { // If the field property is the form ID, skip it From 50474e73319259ebabecf673a76fc028e179a2a7 Mon Sep 17 00:00:00 2001 From: Steve Henty Date: Tue, 13 Nov 2018 14:56:22 +0100 Subject: [PATCH 2/2] Remove empty line --- includes/class-gf-cli-form-field.php | 1 - 1 file changed, 1 deletion(-) diff --git a/includes/class-gf-cli-form-field.php b/includes/class-gf-cli-form-field.php index 28edb36..dc27cd4 100644 --- a/includes/class-gf-cli-form-field.php +++ b/includes/class-gf-cli-form-field.php @@ -289,7 +289,6 @@ public function update( $args, $assoc_args ) { $field['label'] = __( 'Untitled', 'gravityforms' ); } } else { - // Get the property/value for the update data foreach ( $assoc_args as $field_property => $value ) { // If the field property is the form ID, skip it