Completed
Push — master ( c4cd1f...963c86 )
by
unknown
36s
created
redux-core/inc/extensions/repeater/repeater/class-redux-repeater.php 1 patch
Spacing   +15 added lines, -15 removed lines patch added patch discarded remove patch
@@ -115,11 +115,11 @@  discard block
 block discarded – undo
115 115
 										}
116 116
 
117 117
 										foreach ( $field['data'] as $key => $data ) {
118
-											if ( ! isset( $field['args'][ $key ] ) ) {
119
-												$field['args'][ $key ] = array();
118
+											if ( ! isset( $field['args'][$key] ) ) {
119
+												$field['args'][$key] = array();
120 120
 											}
121 121
 
122
-											$field['options'][ $key ] = $this->parent->wordpress_data->get( $data, $field['args'][ $key ], $this->parent->args['opt_name'] );
122
+											$field['options'][$key] = $this->parent->wordpress_data->get( $data, $field['args'][$key], $this->parent->args['opt_name'] );
123 123
 										}
124 124
 									}
125 125
 								}
@@ -127,14 +127,14 @@  discard block
 block discarded – undo
127 127
 								$default = $field['default'] ?? '';
128 128
 
129 129
 								if ( ! empty( $this->repeater_values ) ) {
130
-									$repeater['title'] = ! isset( $this->parent->options[ $this->field['id'] ][ $field['id'] ][ $x ] ) ? $default : $this->parent->options[ $this->field['id'] ][ $field['id'] ][ $x ];
130
+									$repeater['title'] = ! isset( $this->parent->options[$this->field['id']][$field['id']][$x] ) ? $default : $this->parent->options[$this->field['id']][$field['id']][$x];
131 131
 								} else {
132
-									$repeater['title'] = ! isset( $this->parent->options[ $field['id'] ][ $x ] ) ? $default : $this->parent->options[ $field['id'] ][ $x ];
132
+									$repeater['title'] = ! isset( $this->parent->options[$field['id']][$x] ) ? $default : $this->parent->options[$field['id']][$x];
133 133
 								}
134 134
 
135 135
 								if ( isset( $field['options'] ) && is_array( $field['options'] ) ) {
136
-									if ( isset( $field['options'][ $repeater['title'] ] ) ) {
137
-										$repeater['title'] = $field['options'][ $repeater['title'] ];
136
+									if ( isset( $field['options'][$repeater['title']] ) ) {
137
+										$repeater['title'] = $field['options'][$repeater['title']];
138 138
 									}
139 139
 								}
140 140
 							}
@@ -196,8 +196,8 @@  discard block
 block discarded – undo
196 196
 					echo '<table style="margin-top: 0;" class="redux-repeater-accordion redux-repeater form-table no-border">';
197 197
 					echo '<fieldset class="redux-field" data-id="' . esc_attr( $this->field['id'] ) . '">';
198 198
 
199
-					if ( ! isset( $this->value['redux_repeater_data'][ $x ]['title'] ) && is_array( $this->value ) && isset( $this->value['redux_repeater_data'] ) && is_array( $this->value['redux_repeater_data'] ) ) {
200
-						$this->value['redux_repeater_data'][ $x ]['title'] = null;
199
+					if ( ! isset( $this->value['redux_repeater_data'][$x]['title'] ) && is_array( $this->value ) && isset( $this->value['redux_repeater_data'] ) && is_array( $this->value['redux_repeater_data'] ) ) {
200
+						$this->value['redux_repeater_data'][$x]['title'] = null;
201 201
 					}
202 202
 
203 203
 					echo '<input type="hidden" name="' . esc_attr( $this->parent->args['opt_name'] ) . '[' . esc_attr( $this->field['id'] ) . '][redux_repeater_data][' . intval( $x ) . '][title]" value="" class="regular-text slide-title" />';
@@ -319,10 +319,10 @@  discard block
 block discarded – undo
319 319
 					}
320 320
 
321 321
 					foreach ( $field['data'] as $key => $data ) {
322
-						if ( ! isset( $field['args'][ $key ] ) ) {
323
-							$field['args'][ $key ] = array();
322
+						if ( ! isset( $field['args'][$key] ) ) {
323
+							$field['args'][$key] = array();
324 324
 						}
325
-						$field['options'][ $key ] = $this->parent->wordpress_data->get( $data, $field['args'][ $key ], $this->parent->args['opt_name'] );
325
+						$field['options'][$key] = $this->parent->wordpress_data->get( $data, $field['args'][$key], $this->parent->args['opt_name'] );
326 326
 					}
327 327
 				}
328 328
 			}
@@ -330,9 +330,9 @@  discard block
 block discarded – undo
330 330
 			$default = $field['default'] ?? '';
331 331
 
332 332
 			if ( ! empty( $this->repeater_values ) ) {
333
-				$value = empty( $this->parent->options[ $this->field['id'] ][ $orig_field_id ][ $x ] ) ? $default : $this->parent->options[ $this->field['id'] ][ $orig_field_id ][ $x ];
333
+				$value = empty( $this->parent->options[$this->field['id']][$orig_field_id][$x] ) ? $default : $this->parent->options[$this->field['id']][$orig_field_id][$x];
334 334
 			} else {
335
-				$value = empty( $this->parent->options[ $orig_field_id ][ $x ] ) ? $default : $this->parent->options[ $orig_field_id ][ $x ];
335
+				$value = empty( $this->parent->options[$orig_field_id][$x] ) ? $default : $this->parent->options[$orig_field_id][$x];
336 336
 			}
337 337
 
338 338
 			ob_start();
@@ -444,7 +444,7 @@  discard block
 block discarded – undo
444 444
 
445 445
 				$data = $enqueue->localize( $field );
446 446
 
447
-				$this->parent->enqueue_class->localize_data[ $field['type'] ][ $field['id'] ] = $data;
447
+				$this->parent->enqueue_class->localize_data[$field['type']][$field['id']] = $data;
448 448
 			}
449 449
 		}
450 450
 	}
Please login to merge, or discard this patch.
redux-core/inc/extensions/tabbed/tabbed/class-redux-tabbed.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -114,11 +114,11 @@  discard block
 block discarded – undo
114 114
 					}
115 115
 
116 116
 					foreach ( $field['data'] as $key => $data ) {
117
-						if ( ! isset( $field['args'][ $key ] ) ) {
118
-							$field['args'][ $key ] = array();
117
+						if ( ! isset( $field['args'][$key] ) ) {
118
+							$field['args'][$key] = array();
119 119
 						}
120 120
 
121
-						$field['options'][ $key ] = $this->parent->wordpress_data->get( $data, $field['args'][ $key ], $this->parent->args['opt_name'] );
121
+						$field['options'][$key] = $this->parent->wordpress_data->get( $data, $field['args'][$key], $this->parent->args['opt_name'] );
122 122
 					}
123 123
 				}
124 124
 			}
@@ -127,7 +127,7 @@  discard block
 block discarded – undo
127 127
 
128 128
 			// phpcs:ignore Squiz.PHP.CommentedOutCode.Found
129 129
 			// $value = isset( $this->parent->options[ $orig_field_id ] ) && 0 !== (int) $this->parent->options[ $orig_field_id ] ? $this->parent->options[ $orig_field_id ] : $default;
130
-			$value = $this->parent->options[ $orig_field_id ] ?? $default;
130
+			$value = $this->parent->options[$orig_field_id] ?? $default;
131 131
 
132 132
 			$this->parent->render_class->field_input( $field, $value );
133 133
 
@@ -187,7 +187,7 @@  discard block
 block discarded – undo
187 187
 
188 188
 				$data = $enqueue->localize( $field );
189 189
 
190
-				$this->parent->enqueue_class->localize_data[ $field['type'] ][ $field['id'] ] = $data;
190
+				$this->parent->enqueue_class->localize_data[$field['type']][$field['id']] = $data;
191 191
 			}
192 192
 		}
193 193
 
Please login to merge, or discard this patch.