Test Setup Failed
Pull Request — develop (#1801)
by
unknown
02:36
created
field/class-kirki-field-color.php 1 patch
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -53,17 +53,17 @@
 block discarded – undo
53 53
 		}
54 54
 		if ( true === $this->alpha ) {
55 55
 			_doing_it_wrong( 'Kirki::add_field', esc_attr__( 'Do not use "alpha" as an argument in color controls. Use "choices[alpha]" instead.', 'kirki' ), '3.0.10' );
56
-			$this->choices['alpha'] = true;
56
+			$this->choices[ 'alpha' ] = true;
57 57
 		}
58
-		if ( ! isset( $this->choices['alpha'] ) || true !== $this->choices['alpha'] ) {
59
-			$this->choices['alpha'] = true;
60
-			if ( property_exists( $this, 'default' ) && $this->default != null && ! empty( $this->default ) && (is_string($this->default) || is_numeric($this->default)) && strpos('rgba', $this->default) === false ) {
61
-				$this->choices['alpha'] = false;
58
+		if ( ! isset( $this->choices[ 'alpha' ] ) || true !== $this->choices[ 'alpha' ] ) {
59
+			$this->choices[ 'alpha' ] = true;
60
+			if ( property_exists( $this, 'default' ) && $this->default != null && ! empty( $this->default ) && ( is_string( $this->default ) || is_numeric( $this->default ) ) && strpos( 'rgba', $this->default ) === false ) {
61
+				$this->choices[ 'alpha' ] = false;
62 62
 			}
63 63
 		}
64 64
 
65
-		if ( ( ! isset( $this->choices['mode'] ) ) || ( 'hex' !== $this->choices['mode'] || 'hue' !== $this->choices['mode'] ) ) {
66
-			$this->choices['mode'] = 'hex';
65
+		if ( ( ! isset( $this->choices[ 'mode' ] ) ) || ( 'hex' !== $this->choices[ 'mode' ] || 'hue' !== $this->choices[ 'mode' ] ) ) {
66
+			$this->choices[ 'mode' ] = 'hex';
67 67
 		}
68 68
 	}
69 69
 
Please login to merge, or discard this patch.