@@ -51,7 +51,7 @@ discard block |
||
| 51 | 51 | $key = esc_attr( $key ); |
| 52 | 52 | $setting = $key; |
| 53 | 53 | $tooltip = $field['tooltip']; |
| 54 | - $description = isset( $l10n[ 'background-' . $key ] ) ? $l10n[ 'background-' . $key ] : ''; |
|
| 54 | + $description = isset( $l10n['background-' . $key] ) ? $l10n['background-' . $key] : ''; |
|
| 55 | 55 | $output_property = 'background-' . $key; |
| 56 | 56 | $label = ( 0 === $i ) ? $field['label'] : ''; |
| 57 | 57 | $type = 'select'; |
@@ -105,7 +105,7 @@ discard block |
||
| 105 | 105 | * Build the field. |
| 106 | 106 | * We're merging with the original field here, so any extra properties are inherited. |
| 107 | 107 | */ |
| 108 | - $fields[ $property_setting ] = array_merge( $field, array( |
|
| 108 | + $fields[$property_setting] = array_merge( $field, array( |
|
| 109 | 109 | 'type' => $type, |
| 110 | 110 | 'label' => $label, |
| 111 | 111 | 'settings' => $property_setting, |
@@ -116,7 +116,7 @@ discard block |
||
| 116 | 116 | 'description' => $description, |
| 117 | 117 | 'default' => $value, |
| 118 | 118 | 'id' => sanitize_key( str_replace( '[', '-', str_replace( ']', '', $property_setting ) ) ), |
| 119 | - 'choices' => isset( $choices[ $key ] ) ? $choices[ $key ] : array(), |
|
| 119 | + 'choices' => isset( $choices[$key] ) ? $choices[$key] : array(), |
|
| 120 | 120 | 'sanitize_callback' => $sanitize_callback, |
| 121 | 121 | 'output' => ( ! empty( $field['output'] ) ) ? array( |
| 122 | 122 | array( |
@@ -93,14 +93,14 @@ discard block |
||
| 93 | 93 | if ( is_array( $this->choices ) ) { |
| 94 | 94 | foreach ( $this->choices as $choice => $value ) { |
| 95 | 95 | if ( 'labels' !== $choice && true === $value ) { |
| 96 | - $this->json['choices'][ $choice ] = true; |
|
| 96 | + $this->json['choices'][$choice] = true; |
|
| 97 | 97 | } |
| 98 | 98 | } |
| 99 | 99 | } |
| 100 | 100 | if ( is_array( $this->json['default'] ) ) { |
| 101 | 101 | foreach ( $this->json['default'] as $key => $value ) { |
| 102 | - if ( isset( $this->json['choices'][ $key ] ) && ! isset( $this->json['value'][ $key ] ) ) { |
|
| 103 | - $this->json['value'][ $key ] = $value; |
|
| 102 | + if ( isset( $this->json['choices'][$key] ) && ! isset( $this->json['value'][$key] ) ) { |
|
| 103 | + $this->json['value'][$key] = $value; |
|
| 104 | 104 | } |
| 105 | 105 | } |
| 106 | 106 | } |
@@ -208,6 +208,6 @@ discard block |
||
| 208 | 208 | if ( false === $id ) { |
| 209 | 209 | return $translation_strings; |
| 210 | 210 | } |
| 211 | - return $translation_strings[ $id ]; |
|
| 211 | + return $translation_strings[$id]; |
|
| 212 | 212 | } |
| 213 | 213 | } |