Completed
Pull Request — master (#2)
by
unknown
10:42
created
inc/namespace.php 1 patch
Spacing   +12 added lines, -12 removed lines patch added patch discarded remove patch
@@ -102,7 +102,7 @@  discard block
 block discarded – undo
102 102
 	wp_enqueue_style(
103 103
 		'cmb2-brightcove-video-field-css',
104 104
 		plugin_dir_url( __FILE__ ) . 'assets/css/brightcove-video-field.css',
105
-		[],
105
+		[ ],
106 106
 		VERSION
107 107
 	);
108 108
 
@@ -133,10 +133,10 @@  discard block
 block discarded – undo
133 133
 	$field_id = $field->id();
134 134
 
135 135
 	$bc_video_values = [
136
-		'video_id'       => $escaped_value['bc_video_id'] ?? '',
137
-		'player_id'      => $escaped_value['bc_player_id'] ?? '',
138
-		'account_id'     => $escaped_value['bc_account_id'] ?? '',
139
-		'video_duration' => $escaped_value['bc_video_duration'] ?? '',
136
+		'video_id'       => $escaped_value[ 'bc_video_id' ] ?? '',
137
+		'player_id'      => $escaped_value[ 'bc_player_id' ] ?? '',
138
+		'account_id'     => $escaped_value[ 'bc_account_id' ] ?? '',
139
+		'video_duration' => $escaped_value[ 'bc_video_duration' ] ?? '',
140 140
 	];
141 141
 
142 142
 	$bc_video_args = [
@@ -149,14 +149,14 @@  discard block
 block discarded – undo
149 149
 	$bc_video_args = wp_parse_args( $bc_video_values, $bc_video_args );
150 150
 
151 151
 	$allowed_html           = wp_kses_allowed_html( 'post' );
152
-	$allowed_html['iframe'] = [
152
+	$allowed_html[ 'iframe' ] = [
153 153
 		'src'                   => true,
154 154
 		'webkitallowfullscreen' => true,
155 155
 		'allowfullscreen'       => true,
156 156
 		'mozallowfullscreen'    => true,
157 157
 		'style'                 => true,
158 158
 	];
159
-	$allowed_html['input']  = [
159
+	$allowed_html[ 'input' ] = [
160 160
 		'type'      => true,
161 161
 		'class'     => true,
162 162
 		'name'      => true,
@@ -187,7 +187,7 @@  discard block
 block discarded – undo
187 187
 		</button>
188 188
 		<div class="brightcove-video-preview">
189 189
 			<?php
190
-				if( ! empty( $bc_video_args['video_id'] ) ) {
190
+				if ( ! empty( $bc_video_args[ 'video_id' ] ) ) {
191 191
 					echo wp_kses( BC_Video_Shortcode::bc_video( $bc_video_args ), $allowed_html );
192 192
 					echo '<a href="#" class="bc-remove-video">Remove brightcove video</a>';
193 193
 				}
@@ -202,7 +202,7 @@  discard block
 block discarded – undo
202 202
 					'id'    => esc_attr( $field_id . '_bc_video_id' ),
203 203
 					'class' => 'bc_video_id',
204 204
 					'name'  => esc_attr( $field_id . '[bc_video_id]' ),
205
-					'value' => esc_attr( $bc_video_values['video_id'] ) ?? '',
205
+					'value' => esc_attr( $bc_video_values[ 'video_id' ] ) ?? '',
206 206
 				]
207 207
 			),
208 208
 			$allowed_html
@@ -214,7 +214,7 @@  discard block
 block discarded – undo
214 214
 					'id'    => esc_attr( $field_id . '_bc_video_duration' ),
215 215
 					'class' => 'bc_video_duration',
216 216
 					'name'  => esc_attr( $field_id . '[bc_video_duration]' ),
217
-					'value' => esc_attr( $bc_video_values['video_duration'] ) ?? '',
217
+					'value' => esc_attr( $bc_video_values[ 'video_duration' ] ) ?? '',
218 218
 				]
219 219
 			),
220 220
 			$allowed_html
@@ -226,7 +226,7 @@  discard block
 block discarded – undo
226 226
 					'id'    => esc_attr( $field_id . '_bc_player_id' ),
227 227
 					'class' => 'bc_player_id',
228 228
 					'name'  => esc_attr( $field_id . '[bc_player_id]' ),
229
-					'value' => esc_attr( $bc_video_values['player_id'] ) ?? '',
229
+					'value' => esc_attr( $bc_video_values[ 'player_id' ] ) ?? '',
230 230
 				]
231 231
 			),
232 232
 			$allowed_html
@@ -238,7 +238,7 @@  discard block
 block discarded – undo
238 238
 					'id'    => esc_attr( $field_id . '_bc_account_id' ),
239 239
 					'class' => 'bc_account_id',
240 240
 					'name'  => esc_attr( $field_id . '[bc_account_id]' ),
241
-					'value' => esc_attr( $bc_video_values['account_id'] ) ?? '',
241
+					'value' => esc_attr( $bc_video_values[ 'account_id' ] ) ?? '',
242 242
 				]
243 243
 			),
244 244
 			$allowed_html
Please login to merge, or discard this patch.