Completed
Push — develop ( 64c41d...4bb36d )
by Zack
20:30
created
class-gravityview-plugin-hooks-gravity-forms-signature.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -53,7 +53,7 @@  discard block
 block discarded – undo
53 53
 		$signature_fields = GFAPI::get_fields_by_type( $form, 'signature' );
54 54
 
55 55
 		foreach ( $signature_fields as $field ) {
56
-			unset( $_POST["input_{$field->id}"] );
56
+			unset( $_POST[ "input_{$field->id}" ] );
57 57
 		}
58 58
 	}
59 59
 
@@ -72,19 +72,19 @@  discard block
 block discarded – undo
72 72
 	 */
73 73
 	function edit_entry_field_input( $field_content = '', $field, $value = '', $lead_id = 0, $form_id = 0 ) {
74 74
 
75
-		$context = function_exists('gravityview_get_context') ? gravityview_get_context() : '';
75
+		$context = function_exists( 'gravityview_get_context' ) ? gravityview_get_context() : '';
76 76
 
77
-		if( 'signature' !== $field->type || 'edit' !== $context ) {
77
+		if ( 'signature' !== $field->type || 'edit' !== $context ) {
78 78
 			return $field_content;
79 79
 		}
80 80
 
81 81
 		// We need to fetch a fresh version of the entry, since the saved entry hasn't refreshed in GV yet.
82 82
 		$entry = GravityView_View::getInstance()->getCurrentEntry();
83
-		$entry = GFAPI::get_entry( $entry['id'] );
83
+		$entry = GFAPI::get_entry( $entry[ 'id' ] );
84 84
 		$entry_value = \GV\Utils::get( $entry, $field->id );
85 85
 
86
-		$_POST["input_{$field->id}"] = $entry_value; // Used when Edit Entry form *is* submitted
87
-		$_POST["input_{$form_id}_{$field->id}_signature_filename"] = $entry_value; // Used when Edit Entry form *is not* submitted
86
+		$_POST[ "input_{$field->id}" ] = $entry_value; // Used when Edit Entry form *is* submitted
87
+		$_POST[ "input_{$form_id}_{$field->id}_signature_filename" ] = $entry_value; // Used when Edit Entry form *is not* submitted
88 88
 
89 89
 		return ''; // Return empty string to force using $_POST values instead
90 90
 	}
Please login to merge, or discard this patch.
includes/class-gravityview-gfformsmodel.php 1 patch
Spacing   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -40,8 +40,8 @@  discard block
 block discarded – undo
40 40
 	public static function is_value_match( $field_value, $target_value, $operation = 'is', $source_field = null, $rule = null, $form = null ) {
41 41
 
42 42
 		if ( 'date_created' === $source_field ) {
43
-			$field_value = is_int( $field_value )? $field_value : strtotime( $field_value );
44
-			$target_value = is_int( $target_value )? $target_value : strtotime( $target_value );
43
+			$field_value = is_int( $field_value ) ? $field_value : strtotime( $field_value );
44
+			$target_value = is_int( $target_value ) ? $target_value : strtotime( $target_value );
45 45
 		}
46 46
 
47 47
 		return parent::is_value_match( $field_value, $target_value, $operation, $source_field, $rule, $form ); // TODO: Change the autogenerated stub
@@ -65,18 +65,18 @@  discard block
 block discarded – undo
65 65
 
66 66
         $post_data = self::get_post_fields( $form, $entry );
67 67
 
68
-        $media = get_attached_media( 'image', $entry['post_id'] );
68
+        $media = get_attached_media( 'image', $entry[ 'post_id' ] );
69 69
 
70 70
         $post_images = array();
71 71
 
72 72
         foreach ( $media as $media_item ) {
73
-            foreach( (array) $post_data['images'] as $post_data_item ) {
74
-                if(
73
+            foreach ( (array)$post_data[ 'images' ] as $post_data_item ) {
74
+                if (
75 75
                     \GV\Utils::get( $post_data_item, 'title' ) === $media_item->post_title &&
76 76
                     \GV\Utils::get( $post_data_item, 'description' ) === $media_item->post_content &&
77 77
                     \GV\Utils::get( $post_data_item, 'caption' ) === $media_item->post_excerpt
78 78
                 ) {
79
-                    $post_images["{$post_data_item['field_id']}"] = $media_item->ID;
79
+                    $post_images[ "{$post_data_item[ 'field_id' ]}" ] = $media_item->ID;
80 80
                 }
81 81
             }
82 82
         }
@@ -104,7 +104,7 @@  discard block
 block discarded – undo
104 104
          * If the method changes to public, use Gravity Forms' method
105 105
          * @todo: If/when the method is public, remove the unneeded copied code.
106 106
          */
107
-        if( $reflection->isPublic() ) {
107
+        if ( $reflection->isPublic() ) {
108 108
             return parent::get_post_fields( $form, $entry );
109 109
         }
110 110
 
@@ -131,7 +131,7 @@  discard block
 block discarded – undo
131 131
          * If the method changes to public, use Gravity Forms' method
132 132
          * @todo: If/when the method is public, remove the unneeded copied code.
133 133
          */
134
-        if( $reflection->isPublic() ) {
134
+        if ( $reflection->isPublic() ) {
135 135
             return parent::copy_post_image( $url, $post_id );
136 136
         }
137 137
 
@@ -166,7 +166,7 @@  discard block
 block discarded – undo
166 166
          * If the method changes to public, use Gravity Forms' method
167 167
          * @todo: If/when the method is public, remove the unneeded copied code.
168 168
          */
169
-        if( $reflection->isPublic() ) {
169
+        if ( $reflection->isPublic() ) {
170 170
             return parent::media_handle_upload( $url, $post_id, $post_data );
171 171
         }
172 172
 
Please login to merge, or discard this patch.
includes/class-data.php 1 patch
Spacing   +20 added lines, -20 removed lines patch added patch discarded remove patch
@@ -20,7 +20,7 @@  discard block
 block discarded – undo
20 20
 
21 21
 		if ( ! empty( $passed_post ) ) {
22 22
 			$id_or_id_array = $this->maybe_get_view_id( $passed_post );
23
-			foreach( is_array( $id_or_id_array ) ? $id_or_id_array : array( $id_or_id_array ) as $view_id ) {
23
+			foreach ( is_array( $id_or_id_array ) ? $id_or_id_array : array( $id_or_id_array ) as $view_id ) {
24 24
 				if ( \GV\View::exists( $view_id ) && ! $this->views->contains( $view_id ) ) {
25 25
 					$this->views->add( \GV\View::by_id( $view_id ) );
26 26
 				}
@@ -75,7 +75,7 @@  discard block
 block discarded – undo
75 75
 				foreach ( $passed_post as &$post ) {
76 76
 					$views = \GV\View_Collection::from_post( $post );
77 77
 					foreach ( $views->all() as $view ) {
78
-						$ids []= $view->ID;
78
+						$ids [ ] = $view->ID;
79 79
 
80 80
 						/** And as a side-effect... add each view to the global scope. */
81 81
 						if ( ! $this->views->contains( $view->ID ) ) {
@@ -89,29 +89,29 @@  discard block
 block discarded – undo
89 89
 				if ( is_string( $passed_post ) ) {
90 90
 					$shortcodes = \GV\Shortcode::parse( $passed_post );
91 91
 					foreach ( $shortcodes as $shortcode ) {
92
-						if ( $shortcode->name == 'gravityview' && !empty( $shortcode->atts['id'] ) ) {
93
-							$ids []= $shortcode->atts['id'];
92
+						if ( $shortcode->name == 'gravityview' && ! empty( $shortcode->atts[ 'id' ] ) ) {
93
+							$ids [ ] = $shortcode->atts[ 'id' ];
94 94
 
95 95
 							/** And as a side-effect... add each view to the global scope. */
96
-							if ( ! $this->views->contains( $shortcode->atts['id'] ) && \GV\View::exists( $shortcode->atts['id'] ) ) {
97
-								$this->views->add( $shortcode->atts['id'] );
96
+							if ( ! $this->views->contains( $shortcode->atts[ 'id' ] ) && \GV\View::exists( $shortcode->atts[ 'id' ] ) ) {
97
+								$this->views->add( $shortcode->atts[ 'id' ] );
98 98
 							}
99 99
 						}
100 100
 					}
101 101
 				} else {
102 102
 					$id = $this->get_id_from_atts( $passed_post );
103
-					$ids[] = intval( $id );
103
+					$ids[ ] = intval( $id );
104 104
 				}
105 105
 			}
106 106
 		}
107 107
 
108
-		if( empty($ids) ) {
108
+		if ( empty( $ids ) ) {
109 109
 			return NULL;
110 110
 		}
111 111
 
112 112
 		// If it's just one ID, return that.
113 113
 		// Otherwise, return array of IDs
114
-		return ( sizeof( $ids ) === 1 ) ? $ids[0] : $ids;
114
+		return ( sizeof( $ids ) === 1 ) ? $ids[ 0 ] : $ids;
115 115
 	}
116 116
 
117 117
 	/**
@@ -119,7 +119,7 @@  discard block
 block discarded – undo
119 119
 	 */
120 120
 	public static function getInstance( $passed_post = NULL ) {
121 121
 
122
-		if( empty( self::$instance ) ) {
122
+		if ( empty( self::$instance ) ) {
123 123
 			self::$instance = new GravityView_View_Data( $passed_post );
124 124
 		}
125 125
 
@@ -135,8 +135,8 @@  discard block
 block discarded – undo
135 135
 			return array();
136 136
 		}
137 137
 		return array_combine(
138
-			array_map( function ( $view ) { return $view->ID; }, $this->views->all() ),
139
-			array_map( function ( $view ) { return $view->as_data(); }, $this->views->all() )
138
+			array_map( function( $view ) { return $view->ID; }, $this->views->all() ),
139
+			array_map( function( $view ) { return $view->as_data(); }, $this->views->all() )
140 140
 		);
141 141
 	}
142 142
 
@@ -245,22 +245,22 @@  discard block
 block discarded – undo
245 245
 	public function parse_post_content( $content ) {
246 246
 		$ids = array();
247 247
 		foreach ( \GV\Shortcode::parse( $content ) as $shortcode ) {
248
-			if ( $shortcode->name == 'gravityview' && is_numeric( $shortcode->atts['id'] ) ) {
249
-				if ( \GV\View::exists( $shortcode->atts['id'] ) && ! $this->views->contains( $shortcode->atts['id'] ) ) {
250
-					$this->views->add( \GV\View::by_id( $shortcode->atts['id'] ) );
248
+			if ( $shortcode->name == 'gravityview' && is_numeric( $shortcode->atts[ 'id' ] ) ) {
249
+				if ( \GV\View::exists( $shortcode->atts[ 'id' ] ) && ! $this->views->contains( $shortcode->atts[ 'id' ] ) ) {
250
+					$this->views->add( \GV\View::by_id( $shortcode->atts[ 'id' ] ) );
251 251
 				}
252 252
 				/**
253 253
 				 * The original function outputs the ID even though it wasn't added by ::add_view()
254 254
 				 * Wether this is a bug or not remains a mystery. But we need to emulate this behavior
255 255
 				 * until better times.
256 256
 				 */
257
-				$ids []= $shortcode->atts['id'];
257
+				$ids [ ] = $shortcode->atts[ 'id' ];
258 258
 			}
259 259
 		}
260 260
 		if ( empty ( $ids ) ) {
261 261
 			return null;
262 262
 		}
263
-		return ( sizeof( $ids ) === 1 ) ? $ids[0] : $ids;
263
+		return ( sizeof( $ids ) === 1 ) ? $ids[ 0 ] : $ids;
264 264
 	}
265 265
 
266 266
 	/**
@@ -283,7 +283,7 @@  discard block
 block discarded – undo
283 283
 		// Not invalid if not set!
284 284
 		if ( empty( $post_id ) || empty( $view_id ) ) {
285 285
 
286
-			if( $empty_is_valid ) {
286
+			if ( $empty_is_valid ) {
287 287
 				return true;
288 288
 			}
289 289
 
@@ -316,7 +316,7 @@  discard block
 block discarded – undo
316 316
 			$view_ids_in_post = array_map( function( $view ) { return $view->ID; }, $views->all() );
317 317
 
318 318
 			// The post or page specified does not contain the shortcode.
319
-			if ( false === in_array( $view_id, (array) $view_ids_in_post ) ) {
319
+			if ( false === in_array( $view_id, (array)$view_ids_in_post ) ) {
320 320
 				$message = sprintf( esc_html__( 'The Post ID entered is not valid. You may have entered a post or page that does not contain the selected View. Make sure the post contains the following shortcode: %s', 'gravityview' ), '<br /><code>[gravityview id="' . intval( $view_id ) . '"]</code>' );
321 321
 			}
322 322
 		}
@@ -324,7 +324,7 @@  discard block
 block discarded – undo
324 324
 		if ( ! $message ) {
325 325
 			// It's a View
326 326
 			if ( \GV\View::exists( $post_id ) ) {
327
-				$message = esc_html__( 'The ID is already a View.', 'gravityview' );;
327
+				$message = esc_html__( 'The ID is already a View.', 'gravityview' ); ;
328 328
 			}
329 329
 		}
330 330
 
Please login to merge, or discard this patch.
includes/class-gvlogic-shortcode.php 1 patch
Spacing   +20 added lines, -20 removed lines patch added patch discarded remove patch
@@ -87,7 +87,7 @@  discard block
 block discarded – undo
87 87
 	 */
88 88
 	public static function get_instance() {
89 89
 
90
-		if( empty( self::$instance ) ) {
90
+		if ( empty( self::$instance ) ) {
91 91
 			self::$instance = new self;
92 92
 		}
93 93
 
@@ -121,9 +121,9 @@  discard block
 block discarded – undo
121 121
 
122 122
 		$operators = array_merge( self::$SUPPORTED_ARRAY_OPERATORS, self::$SUPPORTED_NUMERIC_OPERATORS, self::$SUPPORTED_SCALAR_OPERATORS, self::$SUPPORTED_CUSTOM_OPERATORS );
123 123
 
124
-		if( $with_values ) {
124
+		if ( $with_values ) {
125 125
 			$operators_with_values = array();
126
-			foreach( $operators as $key ) {
126
+			foreach ( $operators as $key ) {
127 127
 				$operators_with_values[ $key ] = '';
128 128
 			}
129 129
 			return $operators_with_values;
@@ -142,7 +142,7 @@  discard block
 block discarded – undo
142 142
 
143 143
 		$operators = $this->get_operators( false );
144 144
 
145
-		if( !in_array( $operation, $operators ) ) {
145
+		if ( ! in_array( $operation, $operators ) ) {
146 146
 			gravityview()->log->debug( ' Attempted to add invalid operation type. {operation}', array( 'operation' => $operation ) );
147 147
 			return false;
148 148
 		}
@@ -194,7 +194,7 @@  discard block
 block discarded – undo
194 194
 			return null;
195 195
 		}
196 196
 
197
-		if( empty( $atts ) ) {
197
+		if ( empty( $atts ) ) {
198 198
 			gravityview()->log->error( '$atts are empty.', array( 'data' => $atts ) );
199 199
 			return null;
200 200
 		}
@@ -209,7 +209,7 @@  discard block
 block discarded – undo
209 209
 		$this->parse_atts();
210 210
 
211 211
 		// We need an "if"
212
-		if( false === $this->if ) {
212
+		if ( false === $this->if ) {
213 213
 			gravityview()->log->error( '$atts->if is empty.', array( 'data' => $this->passed_atts ) );
214 214
 			return null;
215 215
 		}
@@ -217,7 +217,7 @@  discard block
 block discarded – undo
217 217
 		$setup = $this->setup_operation_and_comparison();
218 218
 
219 219
 		// We need an operation and comparison value
220
-		if( ! $setup ) {
220
+		if ( ! $setup ) {
221 221
 			gravityview()->log->error( 'No valid operators were passed.', array( 'data' => $this->atts ) );
222 222
 			return null;
223 223
 		}
@@ -267,7 +267,7 @@  discard block
 block discarded – undo
267 267
 	 */
268 268
 	private function get_output() {
269 269
 
270
-		if( $this->is_match ) {
270
+		if ( $this->is_match ) {
271 271
 			$output = $this->content;
272 272
 		} else {
273 273
 			$output = $this->else_content;
@@ -285,7 +285,7 @@  discard block
 block discarded – undo
285 285
 		 * @param string $output HTML/text output
286 286
 		 * @param GVLogic_Shortcode $this This class
287 287
 		 */
288
-		$output = apply_filters('gravityview/gvlogic/output', $output, $this );
288
+		$output = apply_filters( 'gravityview/gvlogic/output', $output, $this );
289 289
 
290 290
 		gravityview()->log->debug( 'Output: ', array( 'data' => $output ) );
291 291
 
@@ -305,14 +305,14 @@  discard block
 block discarded – undo
305 305
 		list( $before_else, $after_else ) = array_pad( explode( '[else]', $passed_content ), 2, NULL );
306 306
 		list( $before_else_if, $after_else_if ) = array_pad( explode( '[else', $passed_content ), 2, NULL );
307 307
 
308
-		$else_attr = isset( $this->atts['else'] ) ? $this->atts['else'] : NULL;
308
+		$else_attr = isset( $this->atts[ 'else' ] ) ? $this->atts[ 'else' ] : NULL;
309 309
 		$else_content = isset( $after_else ) ? $after_else : $else_attr;
310 310
 
311 311
 		// The content is everything OTHER than the [else]
312 312
 		$this->content = $before_else_if;
313 313
 
314 314
 		if ( ! $this->is_match ) {
315
-			if( $elseif_content = $this->process_elseif( $before_else ) ) {
315
+			if ( $elseif_content = $this->process_elseif( $before_else ) ) {
316 316
 				$this->else_content = $elseif_content;
317 317
 			} else {
318 318
 				$this->else_content = $else_content;
@@ -340,16 +340,16 @@  discard block
 block discarded – undo
340 340
 		foreach ( $else_if_matches as $key => $else_if_match ) {
341 341
 
342 342
 			// If $else_if_match[5] exists and has content, check for more shortcodes
343
-			preg_match_all( '/' . $regex . '/', $else_if_match[5] . '[/else]', $recursive_matches, PREG_SET_ORDER );
343
+			preg_match_all( '/' . $regex . '/', $else_if_match[ 5 ] . '[/else]', $recursive_matches, PREG_SET_ORDER );
344 344
 
345 345
 			// If the logic passes, this is the value that should be used for $this->else_content
346
-			$else_if_value = $else_if_match[5];
347
-			$check_elseif_match = $else_if_match[0];
346
+			$else_if_value = $else_if_match[ 5 ];
347
+			$check_elseif_match = $else_if_match[ 0 ];
348 348
 
349 349
 			// Retrieve the value of the match that is currently being checked, without any other [else] tags
350
-			if( ! empty( $recursive_matches[0][0] ) ) {
351
-				$else_if_value = str_replace( $recursive_matches[0][0], '', $else_if_value );
352
-				$check_elseif_match = str_replace( $recursive_matches[0][0], '', $check_elseif_match );
350
+			if ( ! empty( $recursive_matches[ 0 ][ 0 ] ) ) {
351
+				$else_if_value = str_replace( $recursive_matches[ 0 ][ 0 ], '', $else_if_value );
352
+				$check_elseif_match = str_replace( $recursive_matches[ 0 ][ 0 ], '', $check_elseif_match );
353 353
 			}
354 354
 
355 355
 			$check_elseif_match = str_replace( '[else', '[gvlogicelse', $check_elseif_match );
@@ -366,7 +366,7 @@  discard block
 block discarded – undo
366 366
 			}
367 367
 
368 368
 			// Process any remaining [else] tags
369
-			return $this->process_elseif( $else_if_match[5] );
369
+			return $this->process_elseif( $else_if_match[ 5 ] );
370 370
 		}
371 371
 
372 372
 		return false;
@@ -392,7 +392,7 @@  discard block
 block discarded – undo
392 392
 		$this->atts = function_exists( 'array_intersect_key' ) ? array_intersect_key( $this->passed_atts, $this->atts ) : $this->atts;
393 393
 
394 394
 		// Strip whitespace if it's not default false
395
-		$this->if = ( isset( $this->atts['if'] ) && is_string( $this->atts['if'] ) ) ? trim( $this->atts['if'] ) : false;
395
+		$this->if = ( isset( $this->atts[ 'if' ] ) && is_string( $this->atts[ 'if' ] ) ) ? trim( $this->atts[ 'if' ] ) : false;
396 396
 
397 397
 		/**
398 398
 		 * @action `gravityview/gvlogic/parse_atts/after` Modify shortcode attributes after it's been parsed
@@ -403,7 +403,7 @@  discard block
 block discarded – undo
403 403
 		do_action( 'gravityview/gvlogic/parse_atts/after', $this );
404 404
 
405 405
 		// Make sure the "if" isn't processed in self::setup_operation_and_comparison()
406
-		unset( $this->atts['if'] );
406
+		unset( $this->atts[ 'if' ] );
407 407
 	}
408 408
 }
409 409
 
Please login to merge, or discard this patch.
includes/class-gravityview-admin-notices.php 1 patch
Spacing   +23 added lines, -23 removed lines patch added patch discarded remove patch
@@ -60,21 +60,21 @@  discard block
 block discarded – undo
60 60
 	public function dismiss_notice() {
61 61
 
62 62
 		// No dismiss sent
63
-		if( empty( $_GET['gv-dismiss'] ) ) {
63
+		if ( empty( $_GET[ 'gv-dismiss' ] ) ) {
64 64
 			return;
65 65
 		}
66 66
 
67 67
 		// Invalid nonce
68
-		if( !wp_verify_nonce( $_GET['gv-dismiss'], 'dismiss' ) ) {
68
+		if ( ! wp_verify_nonce( $_GET[ 'gv-dismiss' ], 'dismiss' ) ) {
69 69
 			return;
70 70
 		}
71 71
 
72
-		$notice_id = esc_attr( $_GET['notice'] );
72
+		$notice_id = esc_attr( $_GET[ 'notice' ] );
73 73
 
74 74
 		//don't display a message if use has dismissed the message for this version
75 75
 		$dismissed_notices = (array)get_transient( 'gravityview_dismissed_notices' );
76 76
 
77
-		$dismissed_notices[] = $notice_id;
77
+		$dismissed_notices[ ] = $notice_id;
78 78
 
79 79
 		$dismissed_notices = array_unique( $dismissed_notices );
80 80
 
@@ -97,12 +97,12 @@  discard block
 block discarded – undo
97 97
 	private function is_notice_dismissed( $notice ) {
98 98
 
99 99
 		// There are no dismissed notices.
100
-		if( empty( self::$dismissed_notices ) ) {
100
+		if ( empty( self::$dismissed_notices ) ) {
101 101
 			return false;
102 102
 		}
103 103
 
104 104
 		// Has the
105
-		$is_dismissed = !empty( $notice['dismiss'] ) && in_array( $notice['dismiss'], self::$dismissed_notices );
105
+		$is_dismissed = ! empty( $notice[ 'dismiss' ] ) && in_array( $notice[ 'dismiss' ], self::$dismissed_notices );
106 106
 
107 107
 		return $is_dismissed ? true : false;
108 108
 	}
@@ -127,7 +127,7 @@  discard block
 block discarded – undo
127 127
 	 */
128 128
 	private function check_show_multisite_notices() {
129 129
 
130
-		if( ! is_multisite() ) {
130
+		if ( ! is_multisite() ) {
131 131
 			return true;
132 132
 		}
133 133
 
@@ -137,7 +137,7 @@  discard block
 block discarded – undo
137 137
 		}
138 138
 
139 139
 		// or they don't have admin capabilities
140
-		if( ! is_super_admin() ) {
140
+		if ( ! is_super_admin() ) {
141 141
 			return false;
142 142
 		}
143 143
 
@@ -160,48 +160,48 @@  discard block
 block discarded – undo
160 160
 		 */
161 161
 		$notices = apply_filters( 'gravityview/admin/notices', self::$admin_notices );
162 162
 
163
-		if( empty( $notices ) || ! $this->check_show_multisite_notices() ) {
163
+		if ( empty( $notices ) || ! $this->check_show_multisite_notices() ) {
164 164
 			return;
165 165
 		}
166 166
 
167 167
 		//don't display a message if use has dismissed the message for this version
168 168
 		// TODO: Use get_user_meta instead of get_transient
169
-		self::$dismissed_notices = isset( $_GET['show-dismissed-notices'] ) ? array() : (array)get_transient( 'gravityview_dismissed_notices' );
169
+		self::$dismissed_notices = isset( $_GET[ 'show-dismissed-notices' ] ) ? array() : (array)get_transient( 'gravityview_dismissed_notices' );
170 170
 
171 171
 		$output = '';
172 172
 
173
-		foreach( $notices as $notice ) {
173
+		foreach ( $notices as $notice ) {
174 174
 
175 175
 			// If the user doesn't have the capability to see the warning
176
-			if( isset( $notice['cap'] ) && false === GVCommon::has_cap( $notice['cap'] ) ) {
176
+			if ( isset( $notice[ 'cap' ] ) && false === GVCommon::has_cap( $notice[ 'cap' ] ) ) {
177 177
 				gravityview()->log->debug( 'Notice not shown because user does not have the capability to view it.', array( 'data' => $notice ) );
178 178
 				continue;
179 179
 			}
180 180
 
181
-			if( true === $this->is_notice_dismissed( $notice ) ) {
181
+			if ( true === $this->is_notice_dismissed( $notice ) ) {
182 182
 				gravityview()->log->debug( 'Notice not shown because the notice has already been dismissed.', array( 'data' => $notice ) );
183 183
 				continue;
184 184
 			}
185 185
 
186
-			$output .= '<div id="message" style="position:relative" class="notice '. gravityview_sanitize_html_class( $notice['class'] ).'">';
186
+			$output .= '<div id="message" style="position:relative" class="notice ' . gravityview_sanitize_html_class( $notice[ 'class' ] ) . '">';
187 187
 
188 188
 			// Too cute to leave out.
189 189
 			$output .= gravityview_get_floaty();
190 190
 
191
-			if( !empty( $notice['title'] ) ) {
192
-				$output .= '<h3>'.esc_html( $notice['title'] ) .'</h3>';
191
+			if ( ! empty( $notice[ 'title' ] ) ) {
192
+				$output .= '<h3>' . esc_html( $notice[ 'title' ] ) . '</h3>';
193 193
 			}
194 194
 
195
-			$message = isset( $notice['message'] ) ? $notice['message'] : '';
195
+			$message = isset( $notice[ 'message' ] ) ? $notice[ 'message' ] : '';
196 196
 
197
-			if( !empty( $notice['dismiss'] ) ) {
197
+			if ( ! empty( $notice[ 'dismiss' ] ) ) {
198 198
 
199
-				$dismiss = esc_attr($notice['dismiss']);
199
+				$dismiss = esc_attr( $notice[ 'dismiss' ] );
200 200
 
201 201
 				$url = esc_url( add_query_arg( array( 'gv-dismiss' => wp_create_nonce( 'dismiss' ), 'notice' => $dismiss ) ) );
202 202
 
203 203
 				$align = is_rtl() ? 'alignleft' : 'alignright';
204
-				$message .= '<a href="'.$url.'" data-notice="'.$dismiss.'" class="' . $align . ' button button-link">'.esc_html__('Dismiss', 'gravityview' ).'</a></p>';
204
+				$message .= '<a href="' . $url . '" data-notice="' . $dismiss . '" class="' . $align . ' button button-link">' . esc_html__( 'Dismiss', 'gravityview' ) . '</a></p>';
205 205
 			}
206 206
 
207 207
 			$output .= wpautop( $message );
@@ -233,14 +233,14 @@  discard block
 block discarded – undo
233 233
 	 */
234 234
 	public static function add_notice( $notice = array() ) {
235 235
 
236
-		if( !isset( $notice['message'] ) ) {
236
+		if ( ! isset( $notice[ 'message' ] ) ) {
237 237
 			gravityview()->log->error( 'Notice not set', array( 'data' => $notice ) );
238 238
 			return;
239 239
 		}
240 240
 
241
-		$notice['class'] = empty( $notice['class'] ) ? 'error' : $notice['class'];
241
+		$notice[ 'class' ] = empty( $notice[ 'class' ] ) ? 'error' : $notice[ 'class' ];
242 242
 
243
-		self::$admin_notices[] = $notice;
243
+		self::$admin_notices[ ] = $notice;
244 244
 	}
245 245
 }
246 246
 
Please login to merge, or discard this patch.
includes/class-gravityview-entry-approval-status.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -113,16 +113,16 @@  discard block
 block discarded – undo
113 113
 		$new_value = $old_value;
114 114
 
115 115
 		// Meta value does not exist yet
116
-		if( false === $old_value ) {
116
+		if ( false === $old_value ) {
117 117
 			return self::UNAPPROVED;
118 118
 		}
119 119
 
120 120
 		// Meta value does not exist yet
121
-		if( true === $old_value ) {
121
+		if ( true === $old_value ) {
122 122
 			return self::APPROVED;
123 123
 		}
124 124
 
125
-		switch ( (string) $old_value ) {
125
+		switch ( (string)$old_value ) {
126 126
 
127 127
 			// Approved values
128 128
 			case 'Approved':
@@ -248,9 +248,9 @@  discard block
 block discarded – undo
248 248
 		foreach ( $choices as $key => $choice ) {
249 249
 
250 250
 			// Is the passed status value the same as the choice value or key?
251
-			if ( $status === $choice['value'] || $status === $key ) {
251
+			if ( $status === $choice[ 'value' ] || $status === $key ) {
252 252
 
253
-				if( 'key' === $attr_key ) {
253
+				if ( 'key' === $attr_key ) {
254 254
 					return $key;
255 255
 				} else {
256 256
 					return \GV\Utils::get( $choice, $attr_key, false );
Please login to merge, or discard this patch.
includes/widgets/class-gravityview-widget-page-links.php 1 patch
Spacing   +16 added lines, -16 removed lines patch added patch discarded remove patch
@@ -11,35 +11,35 @@  discard block
 block discarded – undo
11 11
 
12 12
 	function __construct() {
13 13
 
14
-		$this->widget_description = __('Links to multiple pages of results.', 'gravityview' );
14
+		$this->widget_description = __( 'Links to multiple pages of results.', 'gravityview' );
15 15
 
16 16
 		$default_values = array( 'header' => 1, 'footer' => 1 );
17 17
 		$settings = array( 'show_all' => array(
18 18
 			'type' => 'checkbox',
19 19
 			'label' => __( 'Show each page number', 'gravityview' ),
20
-			'desc' => __('Show every page number instead of summary (eg: 1 2 3 ... 8 »)', 'gravityview'),
20
+			'desc' => __( 'Show every page number instead of summary (eg: 1 2 3 ... 8 »)', 'gravityview' ),
21 21
 			'value' => false
22
-		));
23
-		parent::__construct( __( 'Page Links', 'gravityview' ) , 'page_links', $default_values, $settings );
22
+		) );
23
+		parent::__construct( __( 'Page Links', 'gravityview' ), 'page_links', $default_values, $settings );
24 24
 
25 25
 	}
26 26
 
27
-	public function render_frontend( $widget_args, $content = '', $context = '') {
27
+	public function render_frontend( $widget_args, $content = '', $context = '' ) {
28 28
 		$gravityview_view = GravityView_View::getInstance();
29 29
 
30
-		if( !$this->pre_render_frontend() ) {
30
+		if ( ! $this->pre_render_frontend() ) {
31 31
 			return;
32 32
 		}
33 33
 
34 34
 		$atts = shortcode_atts( array(
35 35
 			'page_size' => \GV\Utils::get( $gravityview_view->paging, 'page_size' ),
36 36
 			'total' => $gravityview_view->total_entries,
37
-			'show_all' => !empty( $this->settings['show_all']['default'] ),
38
-			'current' => (int) \GV\Utils::_GET( 'pagenum', 1 ),
37
+			'show_all' => ! empty( $this->settings[ 'show_all' ][ 'default' ] ),
38
+			'current' => (int)\GV\Utils::_GET( 'pagenum', 1 ),
39 39
 		), $widget_args, 'gravityview_widget_page_links' );
40 40
 		
41 41
 		$page_link_args = array(
42
-			'base' => add_query_arg('pagenum','%#%', gv_directory_link() ),
42
+			'base' => add_query_arg( 'pagenum', '%#%', gv_directory_link() ),
43 43
 			'format' => '&pagenum=%#%',
44 44
 			'add_args' => array(), //
45 45
 			'prev_text' => '&laquo;',
@@ -47,9 +47,9 @@  discard block
 block discarded – undo
47 47
 			'type' => 'list',
48 48
 			'end_size' => 1,
49 49
 			'mid_size' => 2,
50
-			'total' => empty( $atts['page_size'] ) ? 0 : ceil( $atts['total'] / $atts['page_size'] ),
51
-			'current' => $atts['current'],
52
-			'show_all' => !empty( $atts['show_all'] ), // to be available at backoffice
50
+			'total' => empty( $atts[ 'page_size' ] ) ? 0 : ceil( $atts[ 'total' ] / $atts[ 'page_size' ] ),
51
+			'current' => $atts[ 'current' ],
52
+			'show_all' => ! empty( $atts[ 'show_all' ] ), // to be available at backoffice
53 53
 		);
54 54
 
55 55
 		/**
@@ -57,14 +57,14 @@  discard block
 block discarded – undo
57 57
 		 * @since 1.1.4
58 58
 		 * @param array  $page_link_args Array of arguments for the `paginate_links()` function. [Read more about `paginate_links()`](http://developer.wordpress.org/reference/functions/paginate_links/)
59 59
 		 */
60
-		$page_link_args = apply_filters('gravityview_page_links_args', $page_link_args );
60
+		$page_link_args = apply_filters( 'gravityview_page_links_args', $page_link_args );
61 61
 
62 62
 		$page_links = paginate_links( $page_link_args );
63 63
 
64
-		if( !empty( $page_links )) {
65
-			$class = !empty( $widget_args['custom_class'] ) ? $widget_args['custom_class'] : '';
64
+		if ( ! empty( $page_links ) ) {
65
+			$class = ! empty( $widget_args[ 'custom_class' ] ) ? $widget_args[ 'custom_class' ] : '';
66 66
 			$class = gravityview_sanitize_html_class( 'gv-widget-page-links ' . $class );
67
-			echo '<div class="'.$class.'">'. $page_links .'</div>';
67
+			echo '<div class="' . $class . '">' . $page_links . '</div>';
68 68
 		} else {
69 69
 			gravityview()->log->debug( 'No page links; paginate_links() returned empty response.' );
70 70
 		}
Please login to merge, or discard this patch.
includes/widgets/class-gravityview-widget-custom-content.php 1 patch
Spacing   +14 added lines, -14 removed lines patch added patch discarded remove patch
@@ -17,7 +17,7 @@  discard block
 block discarded – undo
17 17
 
18 18
 	function __construct() {
19 19
 
20
-		$this->widget_description = __('Insert custom text or HTML as a widget', 'gravityview' );
20
+		$this->widget_description = __( 'Insert custom text or HTML as a widget', 'gravityview' );
21 21
 
22 22
 		$default_values = array(
23 23
 			'header' => 1,
@@ -42,39 +42,39 @@  discard block
 block discarded – undo
42 42
 			),
43 43
 		);
44 44
 
45
-		parent::__construct( __( 'Custom Content', 'gravityview' ) , 'custom_content', $default_values, $settings );
45
+		parent::__construct( __( 'Custom Content', 'gravityview' ), 'custom_content', $default_values, $settings );
46 46
 	}
47 47
 
48
-	public function render_frontend( $widget_args, $content = '', $context = '') {
48
+	public function render_frontend( $widget_args, $content = '', $context = '' ) {
49 49
 
50
-		if( !$this->pre_render_frontend() ) {
50
+		if ( ! $this->pre_render_frontend() ) {
51 51
 			return;
52 52
 		}
53 53
 
54
-		if( !empty( $widget_args['title'] ) ) {
55
-			echo $widget_args['title'];
54
+		if ( ! empty( $widget_args[ 'title' ] ) ) {
55
+			echo $widget_args[ 'title' ];
56 56
 		}
57 57
 
58 58
 
59 59
 		// Make sure the class is loaded in DataTables
60
-		if( !class_exists( 'GFFormDisplay' ) ) {
60
+		if ( ! class_exists( 'GFFormDisplay' ) ) {
61 61
 			include_once( GFCommon::get_base_path() . '/form_display.php' );
62 62
 		}
63 63
 
64
-		$widget_args['content'] = trim( rtrim( $widget_args['content'] ) );
64
+		$widget_args[ 'content' ] = trim( rtrim( $widget_args[ 'content' ] ) );
65 65
 
66 66
 		// No custom content
67
-		if( empty( $widget_args['content'] ) ) {
67
+		if ( empty( $widget_args[ 'content' ] ) ) {
68 68
 			gravityview()->log->debug( 'No content.' );
69 69
 			return;
70 70
 		}
71 71
 
72 72
 		// Add paragraphs?
73
-		if( !empty( $widget_args['wpautop'] ) ) {
74
-			$widget_args['content'] = wpautop( $widget_args['content'] );
73
+		if ( ! empty( $widget_args[ 'wpautop' ] ) ) {
74
+			$widget_args[ 'content' ] = wpautop( $widget_args[ 'content' ] );
75 75
 		}
76 76
 
77
-		$content = $widget_args['content'];
77
+		$content = $widget_args[ 'content' ];
78 78
 
79 79
 		$content = GravityView_Merge_Tags::replace_variables( $content, array(), array(), false, true, false );
80 80
 
@@ -84,10 +84,10 @@  discard block
 block discarded – undo
84 84
 
85 85
 
86 86
 		// Add custom class
87
-		$class = !empty( $widget_args['custom_class'] ) ? $widget_args['custom_class'] : '';
87
+		$class = ! empty( $widget_args[ 'custom_class' ] ) ? $widget_args[ 'custom_class' ] : '';
88 88
 		$class = gravityview_sanitize_html_class( $class );
89 89
 
90
-		echo '<div class="gv-widget-custom-content '.$class.'">'. $content .'</div>';
90
+		echo '<div class="gv-widget-custom-content ' . $class . '">' . $content . '</div>';
91 91
 
92 92
 	}
93 93
 
Please login to merge, or discard this patch.
includes/widgets/search-widget/class-search-widget.php 1 patch
Spacing   +109 added lines, -109 removed lines patch added patch discarded remove patch
@@ -64,7 +64,7 @@  discard block
 block discarded – undo
64 64
 				'type' => 'radio',
65 65
 				'full_width' => true,
66 66
 				'label' => esc_html__( 'Search Mode', 'gravityview' ),
67
-				'desc' => __('Should search results match all search fields, or any?', 'gravityview'),
67
+				'desc' => __( 'Should search results match all search fields, or any?', 'gravityview' ),
68 68
 				'value' => 'any',
69 69
 				'class' => 'hide-if-js',
70 70
 				'options' => array(
@@ -86,7 +86,7 @@  discard block
 block discarded – undo
86 86
 
87 87
 			// admin - add scripts - run at 1100 to make sure GravityView_Admin_Views::add_scripts_and_styles() runs first at 999
88 88
 			add_action( 'admin_enqueue_scripts', array( $this, 'add_scripts_and_styles' ), 1100 );
89
-			add_action( 'wp_enqueue_scripts', array( $this, 'register_scripts') );
89
+			add_action( 'wp_enqueue_scripts', array( $this, 'register_scripts' ) );
90 90
 			add_filter( 'gravityview_noconflict_scripts', array( $this, 'register_no_conflict' ) );
91 91
 
92 92
 			// ajax - get the searchable fields
@@ -224,7 +224,7 @@  discard block
 block discarded – undo
224 224
 		$script_min = ( defined( 'SCRIPT_DEBUG' ) && SCRIPT_DEBUG ) ? '' : '.min';
225 225
 		$script_source = empty( $script_min ) ? '/source' : '';
226 226
 
227
-		wp_enqueue_script( 'gravityview_searchwidget_admin', plugins_url( 'assets/js'.$script_source.'/admin-search-widget'.$script_min.'.js', __FILE__ ), array( 'jquery', 'gravityview_views_scripts' ), \GV\Plugin::$version );
227
+		wp_enqueue_script( 'gravityview_searchwidget_admin', plugins_url( 'assets/js' . $script_source . '/admin-search-widget' . $script_min . '.js', __FILE__ ), array( 'jquery', 'gravityview_views_scripts' ), \GV\Plugin::$version );
228 228
 
229 229
 		wp_localize_script( 'gravityview_searchwidget_admin', 'gvSearchVar', array(
230 230
 			'nonce' => wp_create_nonce( 'gravityview_ajaxsearchwidget' ),
@@ -246,7 +246,7 @@  discard block
 block discarded – undo
246 246
 	 * @return array Scripts allowed in no-conflict mode, plus the search widget script
247 247
 	 */
248 248
 	public function register_no_conflict( $allowed ) {
249
-		$allowed[] = 'gravityview_searchwidget_admin';
249
+		$allowed[ ] = 'gravityview_searchwidget_admin';
250 250
 		return $allowed;
251 251
 	}
252 252
 
@@ -259,24 +259,24 @@  discard block
 block discarded – undo
259 259
 	 */
260 260
 	public static function get_searchable_fields() {
261 261
 
262
-		if ( ! isset( $_POST['nonce'] ) || ! wp_verify_nonce( $_POST['nonce'], 'gravityview_ajaxsearchwidget' ) ) {
262
+		if ( ! isset( $_POST[ 'nonce' ] ) || ! wp_verify_nonce( $_POST[ 'nonce' ], 'gravityview_ajaxsearchwidget' ) ) {
263 263
 			exit( '0' );
264 264
 		}
265 265
 
266 266
 		$form = '';
267 267
 
268 268
 		// Fetch the form for the current View
269
-		if ( ! empty( $_POST['view_id'] ) ) {
269
+		if ( ! empty( $_POST[ 'view_id' ] ) ) {
270 270
 
271
-			$form = gravityview_get_form_id( $_POST['view_id'] );
271
+			$form = gravityview_get_form_id( $_POST[ 'view_id' ] );
272 272
 
273
-		} elseif ( ! empty( $_POST['formid'] ) ) {
273
+		} elseif ( ! empty( $_POST[ 'formid' ] ) ) {
274 274
 
275
-			$form = (int) $_POST['formid'];
275
+			$form = (int)$_POST[ 'formid' ];
276 276
 
277
-		} elseif ( ! empty( $_POST['template_id'] ) && class_exists( 'GravityView_Ajax' ) ) {
277
+		} elseif ( ! empty( $_POST[ 'template_id' ] ) && class_exists( 'GravityView_Ajax' ) ) {
278 278
 
279
-			$form = GravityView_Ajax::pre_get_form_fields( $_POST['template_id'] );
279
+			$form = GravityView_Ajax::pre_get_form_fields( $_POST[ 'template_id' ] );
280 280
 
281 281
 		}
282 282
 
@@ -325,8 +325,8 @@  discard block
 block discarded – undo
325 325
 			),
326 326
 		);
327 327
 
328
-		foreach( $custom_fields as $custom_field_key => $custom_field ) {
329
-			$output .= sprintf( '<option value="%s" %s data-inputtypes="%s" data-placeholder="%s">%s</option>', $custom_field_key, selected( $custom_field_key, $current, false ), $custom_field['type'], self::get_field_label( array('field' => $custom_field_key ) ), $custom_field['text'] );
328
+		foreach ( $custom_fields as $custom_field_key => $custom_field ) {
329
+			$output .= sprintf( '<option value="%s" %s data-inputtypes="%s" data-placeholder="%s">%s</option>', $custom_field_key, selected( $custom_field_key, $current, false ), $custom_field[ 'type' ], self::get_field_label( array( 'field' => $custom_field_key ) ), $custom_field[ 'text' ] );
330 330
 		}
331 331
 
332 332
 		// Get fields with sub-inputs and no parent
@@ -348,13 +348,13 @@  discard block
 block discarded – undo
348 348
 
349 349
 			foreach ( $fields as $id => $field ) {
350 350
 
351
-				if ( in_array( $field['type'], $blacklist_field_types ) ) {
351
+				if ( in_array( $field[ 'type' ], $blacklist_field_types ) ) {
352 352
 					continue;
353 353
 				}
354 354
 
355
-				$types = self::get_search_input_types( $id, $field['type'] );
355
+				$types = self::get_search_input_types( $id, $field[ 'type' ] );
356 356
 
357
-				$output .= '<option value="'. $id .'" '. selected( $id, $current, false ).'data-inputtypes="'. esc_attr( $types ) .'">'. esc_html( $field['label'] ) .'</option>';
357
+				$output .= '<option value="' . $id . '" ' . selected( $id, $current, false ) . 'data-inputtypes="' . esc_attr( $types ) . '">' . esc_html( $field[ 'label' ] ) . '</option>';
358 358
 			}
359 359
 		}
360 360
 
@@ -377,7 +377,7 @@  discard block
 block discarded – undo
377 377
 	public static function get_search_input_types( $field_id = '', $field_type = null ) {
378 378
 
379 379
 		// @todo - This needs to be improved - many fields have . including products and addresses
380
-		if ( false !== strpos( (string) $field_id, '.' ) && in_array( $field_type, array( 'checkbox' ) ) || in_array( $field_id, array( 'is_fulfilled' ) ) ) {
380
+		if ( false !== strpos( (string)$field_id, '.' ) && in_array( $field_type, array( 'checkbox' ) ) || in_array( $field_id, array( 'is_fulfilled' ) ) ) {
381 381
 			$input_type = 'boolean'; // on/off checkbox
382 382
 		} elseif ( in_array( $field_type, array( 'checkbox', 'post_category', 'multiselect' ) ) ) {
383 383
 			$input_type = 'multi'; //multiselect
@@ -421,19 +421,19 @@  discard block
 block discarded – undo
421 421
 			$post_id = 0;
422 422
 
423 423
 			// We're in the WordPress Widget context, and an overriding post ID has been set.
424
-			if ( ! empty( $widget_args['post_id'] ) ) {
425
-				$post_id = absint( $widget_args['post_id'] );
424
+			if ( ! empty( $widget_args[ 'post_id' ] ) ) {
425
+				$post_id = absint( $widget_args[ 'post_id' ] );
426 426
 			}
427 427
 			// We're in the WordPress Widget context, and the base View ID should be used
428
-			else if ( ! empty( $widget_args['view_id'] ) ) {
429
-				$post_id = absint( $widget_args['view_id'] );
428
+			else if ( ! empty( $widget_args[ 'view_id' ] ) ) {
429
+				$post_id = absint( $widget_args[ 'view_id' ] );
430 430
 			}
431 431
 
432 432
 			$args = gravityview_get_permalink_query_args( $post_id );
433 433
 
434 434
 			// Add hidden fields to the search form
435 435
 			foreach ( $args as $key => $value ) {
436
-				$search_fields[] = array(
436
+				$search_fields[ ] = array(
437 437
 					'name'  => $key,
438 438
 					'input' => 'hidden',
439 439
 					'value' => $value,
@@ -470,22 +470,22 @@  discard block
 block discarded – undo
470 470
 		/**
471 471
 		 * Include the sidebar Widgets.
472 472
 		 */
473
-		$widgets = (array) get_option( 'widget_gravityview_search', array() );
473
+		$widgets = (array)get_option( 'widget_gravityview_search', array() );
474 474
 
475 475
 		foreach ( $widgets as $widget ) {
476
-			if ( ! empty( $widget['view_id'] ) && $widget['view_id'] == $view->ID ) {
477
-				if( $_fields = json_decode( $widget['search_fields'], true ) ) {
476
+			if ( ! empty( $widget[ 'view_id' ] ) && $widget[ 'view_id' ] == $view->ID ) {
477
+				if ( $_fields = json_decode( $widget[ 'search_fields' ], true ) ) {
478 478
 					foreach ( $_fields as $field ) {
479
-						$searchable_fields [] = $field['field'];
479
+						$searchable_fields [ ] = $field[ 'field' ];
480 480
 					}
481 481
 				}
482 482
 			}
483 483
 		}
484 484
 
485 485
 		foreach ( $view->widgets->by_id( $this->get_widget_id() )->all() as $widget ) {
486
-			if( $_fields = json_decode( $widget->configuration->get( 'search_fields' ), true ) ) {
486
+			if ( $_fields = json_decode( $widget->configuration->get( 'search_fields' ), true ) ) {
487 487
 				foreach ( $_fields as $field ) {
488
-					$searchable_fields [] = $field['field'];
488
+					$searchable_fields [ ] = $field[ 'field' ];
489 489
 				}
490 490
 			}
491 491
 		}
@@ -502,7 +502,7 @@  discard block
 block discarded – undo
502 502
 	 */
503 503
 	public function filter_entries( $search_criteria, $form_id = null, $args = array() ) {
504 504
 
505
-		if( 'post' === $this->search_method ) {
505
+		if ( 'post' === $this->search_method ) {
506 506
 			$get = $_POST;
507 507
 		} else {
508 508
 			$get = $_GET;
@@ -521,14 +521,14 @@  discard block
 block discarded – undo
521 521
 		$get = gv_map_deep( $get, 'rawurldecode' );
522 522
 
523 523
 		// Make sure array key is set up
524
-		$search_criteria['field_filters'] = \GV\Utils::get( $search_criteria, 'field_filters', array() );
524
+		$search_criteria[ 'field_filters' ] = \GV\Utils::get( $search_criteria, 'field_filters', array() );
525 525
 
526 526
 		$searchable_fields = $this->get_view_searchable_fields( $view );
527 527
 
528 528
 		// add free search
529
-		if ( isset( $get['gv_search'] ) && '' !== $get['gv_search'] && in_array( 'search_all', $searchable_fields ) ) {
529
+		if ( isset( $get[ 'gv_search' ] ) && '' !== $get[ 'gv_search' ] && in_array( 'search_all', $searchable_fields ) ) {
530 530
 
531
-			$search_all_value = trim( $get['gv_search'] );
531
+			$search_all_value = trim( $get[ 'gv_search' ] );
532 532
 
533 533
 			/**
534 534
 			 * @filter `gravityview/search-all-split-words` Search for each word separately or the whole phrase?
@@ -553,7 +553,7 @@  discard block
 block discarded – undo
553 553
 			}
554 554
 
555 555
 			foreach ( $words as $word ) {
556
-				$search_criteria['field_filters'][] = array(
556
+				$search_criteria[ 'field_filters' ][ ] = array(
557 557
 					'key' => null, // The field ID to search
558 558
 					'value' => $word, // The value to search
559 559
 					'operator' => 'contains', // What to search in. Options: `is` or `contains`
@@ -563,19 +563,19 @@  discard block
 block discarded – undo
563 563
 
564 564
 		// start date & end date
565 565
 		if ( in_array( 'entry_date', $searchable_fields ) ) {
566
-			$curr_start = !empty( $get['gv_start'] ) ? $get['gv_start'] : '';
567
-			$curr_end = !empty( $get['gv_start'] ) ? $get['gv_end'] : '';
566
+			$curr_start = ! empty( $get[ 'gv_start' ] ) ? $get[ 'gv_start' ] : '';
567
+			$curr_end = ! empty( $get[ 'gv_start' ] ) ? $get[ 'gv_end' ] : '';
568 568
 
569 569
 			if ( $view ) {
570 570
 				/**
571 571
 				 * Override start and end dates if View is limited to some already.
572 572
 				 */
573
-				if ( $start_date =$view->settings->get( 'start_date' ) ) {
573
+				if ( $start_date = $view->settings->get( 'start_date' ) ) {
574 574
 					if ( $start_timestamp = strtotime( $curr_start ) ) {
575 575
 						$curr_start = $start_timestamp < strtotime( $start_date ) ? $start_date : $curr_start;
576 576
 					}
577 577
 				}
578
-				if ( $end_date =$view->settings->get( 'end_date' ) ) {
578
+				if ( $end_date = $view->settings->get( 'end_date' ) ) {
579 579
 					if ( $end_timestamp = strtotime( $curr_end ) ) {
580 580
 						$curr_end = $end_timestamp > strtotime( $end_date ) ? $end_date : $curr_end;
581 581
 					}
@@ -596,19 +596,19 @@  discard block
 block discarded – undo
596 596
 			 */
597 597
 			if ( ! empty( $curr_start ) ) {
598 598
 				$curr_start = date( 'Y-m-d H:i:s', strtotime( $curr_start ) );
599
-				$search_criteria['start_date'] = $adjust_tz ? get_gmt_from_date( $curr_start ) : $curr_start;
599
+				$search_criteria[ 'start_date' ] = $adjust_tz ? get_gmt_from_date( $curr_start ) : $curr_start;
600 600
 			}
601 601
 
602 602
 			if ( ! empty( $curr_end ) ) {
603 603
 				// Fast-forward 24 hour on the end time
604 604
 				$curr_end = date( 'Y-m-d H:i:s', strtotime( $curr_end ) + DAY_IN_SECONDS );
605
-				$search_criteria['end_date'] = $adjust_tz ? get_gmt_from_date( $curr_end ) : $curr_end;
605
+				$search_criteria[ 'end_date' ] = $adjust_tz ? get_gmt_from_date( $curr_end ) : $curr_end;
606 606
 			}
607 607
 		}
608 608
 
609 609
 		// search for a specific entry ID
610 610
 		if ( ! empty( $get[ 'gv_id' ] ) && in_array( 'entry_id', $searchable_fields ) ) {
611
-			$search_criteria['field_filters'][] = array(
611
+			$search_criteria[ 'field_filters' ][ ] = array(
612 612
 				'key' => 'id',
613 613
 				'value' => absint( $get[ 'gv_id' ] ),
614 614
 				'operator' => '=',
@@ -617,42 +617,42 @@  discard block
 block discarded – undo
617 617
 
618 618
 		// search for a specific Created_by ID
619 619
 		if ( ! empty( $get[ 'gv_by' ] ) && in_array( 'entry_creator', $searchable_fields ) ) {
620
-			$search_criteria['field_filters'][] = array(
620
+			$search_criteria[ 'field_filters' ][ ] = array(
621 621
 				'key' => 'created_by',
622
-				'value' => absint( $get['gv_by'] ),
622
+				'value' => absint( $get[ 'gv_by' ] ),
623 623
 				'operator' => '=',
624 624
 			);
625 625
 		}
626 626
 
627 627
 
628 628
 		// Get search mode passed in URL
629
-		$mode = isset( $get['mode'] ) && in_array( $get['mode'], array( 'any', 'all' ) ) ?  $get['mode'] : 'any';
629
+		$mode = isset( $get[ 'mode' ] ) && in_array( $get[ 'mode' ], array( 'any', 'all' ) ) ? $get[ 'mode' ] : 'any';
630 630
 
631 631
 		// get the other search filters
632 632
 		foreach ( $get as $key => $value ) {
633 633
 
634
-			if ( 0 !== strpos( $key, 'filter_' ) || gv_empty( $value, false, false ) || ( is_array( $value ) && count( $value ) === 1 && gv_empty( $value[0], false, false ) ) ) {
634
+			if ( 0 !== strpos( $key, 'filter_' ) || gv_empty( $value, false, false ) || ( is_array( $value ) && count( $value ) === 1 && gv_empty( $value[ 0 ], false, false ) ) ) {
635 635
 				continue;
636 636
 			}
637 637
 
638 638
 			$filter_key = $this->convert_request_key_to_filter_key( $key );
639 639
 
640 640
 			// could return simple filter or multiple filters
641
-			if ( ! in_array( 'search_all', $searchable_fields ) && ! in_array( $filter_key , $searchable_fields ) ) {
641
+			if ( ! in_array( 'search_all', $searchable_fields ) && ! in_array( $filter_key, $searchable_fields ) ) {
642 642
 				continue;
643 643
 			}
644 644
 
645 645
 			$filter = $this->prepare_field_filter( $filter_key, $value, $view );
646 646
 
647
-			if ( isset( $filter[0]['value'] ) ) {
648
-				$search_criteria['field_filters'] = array_merge( $search_criteria['field_filters'], $filter );
647
+			if ( isset( $filter[ 0 ][ 'value' ] ) ) {
648
+				$search_criteria[ 'field_filters' ] = array_merge( $search_criteria[ 'field_filters' ], $filter );
649 649
 
650 650
 				// if date range type, set search mode to ALL
651
-				if ( ! empty( $filter[0]['operator'] ) && in_array( $filter[0]['operator'], array( '>=', '<=', '>', '<' ) ) ) {
651
+				if ( ! empty( $filter[ 0 ][ 'operator' ] ) && in_array( $filter[ 0 ][ 'operator' ], array( '>=', '<=', '>', '<' ) ) ) {
652 652
 					$mode = 'all';
653 653
 				}
654
-			} elseif( !empty( $filter ) ) {
655
-				$search_criteria['field_filters'][] = $filter;
654
+			} elseif ( ! empty( $filter ) ) {
655
+				$search_criteria[ 'field_filters' ][ ] = $filter;
656 656
 			}
657 657
 		}
658 658
 
@@ -661,7 +661,7 @@  discard block
 block discarded – undo
661 661
 		 * @since 1.5.1
662 662
 		 * @param[out,in] string $mode Search mode (`any` vs `all`)
663 663
 		 */
664
-		$search_criteria['field_filters']['mode'] = apply_filters( 'gravityview/search/mode', $mode );
664
+		$search_criteria[ 'field_filters' ][ 'mode' ] = apply_filters( 'gravityview/search/mode', $mode );
665 665
 
666 666
 		gravityview()->log->debug( 'Returned Search Criteria: ', array( 'data' => $search_criteria ) );
667 667
 
@@ -689,7 +689,7 @@  discard block
 block discarded – undo
689 689
 		$field_id = str_replace( 'filter_', '', $key );
690 690
 
691 691
 		// calculates field_id, removing 'filter_' and for '_' for advanced fields ( like name or checkbox )
692
-		if ( preg_match('/^[0-9_]+$/ism', $field_id ) ) {
692
+		if ( preg_match( '/^[0-9_]+$/ism', $field_id ) ) {
693 693
 			$field_id = str_replace( '_', '.', $field_id );
694 694
 		}
695 695
 
@@ -724,7 +724,7 @@  discard block
 block discarded – undo
724 724
 
725 725
 			case 'select':
726 726
 			case 'radio':
727
-				$filter['operator'] = 'is';
727
+				$filter[ 'operator' ] = 'is';
728 728
 				break;
729 729
 
730 730
 			case 'post_category':
@@ -738,7 +738,7 @@  discard block
 block discarded – undo
738 738
 
739 739
 				foreach ( $value as $val ) {
740 740
 					$cat = get_term( $val, 'category' );
741
-					$filter[] = array(
741
+					$filter[ ] = array(
742 742
 						'key'      => $filter_key,
743 743
 						'value'    => esc_attr( $cat->name ) . ':' . $val,
744 744
 						'operator' => 'is',
@@ -757,7 +757,7 @@  discard block
 block discarded – undo
757 757
 				$filter = array();
758 758
 
759 759
 				foreach ( $value as $val ) {
760
-					$filter[] = array( 'key' => $filter_key, 'value' => $val );
760
+					$filter[ ] = array( 'key' => $filter_key, 'value' => $val );
761 761
 				}
762 762
 
763 763
 				break;
@@ -766,9 +766,9 @@  discard block
 block discarded – undo
766 766
 				// convert checkbox on/off into the correct search filter
767 767
 				if ( false !== strpos( $filter_key, '.' ) && ! empty( $form_field->inputs ) && ! empty( $form_field->choices ) ) {
768 768
 					foreach ( $form_field->inputs as $k => $input ) {
769
-						if ( $input['id'] == $filter_key ) {
770
-							$filter['value'] = $form_field->choices[ $k ]['value'];
771
-							$filter['operator'] = 'is';
769
+						if ( $input[ 'id' ] == $filter_key ) {
770
+							$filter[ 'value' ] = $form_field->choices[ $k ][ 'value' ];
771
+							$filter[ 'operator' ] = 'is';
772 772
 							break;
773 773
 						}
774 774
 					}
@@ -778,7 +778,7 @@  discard block
 block discarded – undo
778 778
 					$filter = array();
779 779
 
780 780
 					foreach ( $value as $val ) {
781
-						$filter[] = array(
781
+						$filter[ ] = array(
782 782
 							'key'      => $filter_key,
783 783
 							'value'    => $val,
784 784
 							'operator' => 'is',
@@ -799,9 +799,9 @@  discard block
 block discarded – undo
799 799
 					foreach ( $words as $word ) {
800 800
 						if ( ! empty( $word ) && strlen( $word ) > 1 ) {
801 801
 							// Keep the same key for each filter
802
-							$filter['value'] = $word;
802
+							$filter[ 'value' ] = $word;
803 803
 							// Add a search for the value
804
-							$filters[] = $filter;
804
+							$filters[ ] = $filter;
805 805
 						}
806 806
 					}
807 807
 
@@ -828,19 +828,19 @@  discard block
 block discarded – undo
828 828
 						 * @since 1.16.3
829 829
 						 * Safeguard until GF implements '<=' operator
830 830
 						 */
831
-						if( !GFFormsModel::is_valid_operator( $operator ) && $operator === '<=' ) {
831
+						if ( ! GFFormsModel::is_valid_operator( $operator ) && $operator === '<=' ) {
832 832
 							$operator = '<';
833 833
 							$date = date( 'Y-m-d', strtotime( $date . ' +1 day' ) );
834 834
 						}
835 835
 
836
-						$filter[] = array(
836
+						$filter[ ] = array(
837 837
 							'key'      => $filter_key,
838 838
 							'value'    => self::get_formatted_date( $date, 'Y-m-d' ),
839 839
 							'operator' => $operator,
840 840
 						);
841 841
 					}
842 842
 				} else {
843
-					$filter['value'] = self::get_formatted_date( $value, 'Y-m-d' );
843
+					$filter[ 'value' ] = self::get_formatted_date( $value, 'Y-m-d' );
844 844
 				}
845 845
 
846 846
 				break;
@@ -871,7 +871,7 @@  discard block
 block discarded – undo
871 871
 			'ymd_dot' => 'Y.m.d',
872 872
 		);
873 873
 
874
-		if ( ! empty( $field->dateFormat ) && isset( $datepicker[ $field->dateFormat ] ) ){
874
+		if ( ! empty( $field->dateFormat ) && isset( $datepicker[ $field->dateFormat ] ) ) {
875 875
 			$format = $datepicker[ $field->dateFormat ];
876 876
 		}
877 877
 
@@ -902,7 +902,7 @@  discard block
 block discarded – undo
902 902
 	public function add_template_path( $file_paths ) {
903 903
 
904 904
 		// Index 100 is the default GravityView template path.
905
-		$file_paths[102] = self::$file . 'templates/';
905
+		$file_paths[ 102 ] = self::$file . 'templates/';
906 906
 
907 907
 		return $file_paths;
908 908
 	}
@@ -921,7 +921,7 @@  discard block
 block discarded – undo
921 921
 		$has_date = false;
922 922
 
923 923
 		foreach ( $search_fields as $k => $field ) {
924
-			if ( in_array( $field['input'], array( 'date', 'date_range', 'entry_date' ) ) ) {
924
+			if ( in_array( $field[ 'input' ], array( 'date', 'date_range', 'entry_date' ) ) ) {
925 925
 				$has_date = true;
926 926
 				break;
927 927
 			}
@@ -948,7 +948,7 @@  discard block
 block discarded – undo
948 948
 		}
949 949
 
950 950
 		// get configured search fields
951
-		$search_fields = ! empty( $widget_args['search_fields'] ) ? json_decode( $widget_args['search_fields'], true ) : '';
951
+		$search_fields = ! empty( $widget_args[ 'search_fields' ] ) ? json_decode( $widget_args[ 'search_fields' ], true ) : '';
952 952
 
953 953
 		if ( empty( $search_fields ) || ! is_array( $search_fields ) ) {
954 954
 			gravityview()->log->debug( 'No search fields configured for widget:', array( 'data' => $widget_args ) );
@@ -963,34 +963,34 @@  discard block
 block discarded – undo
963 963
 
964 964
 			$updated_field = $this->get_search_filter_details( $updated_field );
965 965
 
966
-			switch ( $field['field'] ) {
966
+			switch ( $field[ 'field' ] ) {
967 967
 
968 968
 				case 'search_all':
969
-					$updated_field['key'] = 'search_all';
970
-					$updated_field['input'] = 'search_all';
971
-					$updated_field['value'] = $this->rgget_or_rgpost( 'gv_search' );
969
+					$updated_field[ 'key' ] = 'search_all';
970
+					$updated_field[ 'input' ] = 'search_all';
971
+					$updated_field[ 'value' ] = $this->rgget_or_rgpost( 'gv_search' );
972 972
 					break;
973 973
 
974 974
 				case 'entry_date':
975
-					$updated_field['key'] = 'entry_date';
976
-					$updated_field['input'] = 'entry_date';
977
-					$updated_field['value'] = array(
975
+					$updated_field[ 'key' ] = 'entry_date';
976
+					$updated_field[ 'input' ] = 'entry_date';
977
+					$updated_field[ 'value' ] = array(
978 978
 						'start' => $this->rgget_or_rgpost( 'gv_start' ),
979 979
 						'end' => $this->rgget_or_rgpost( 'gv_end' ),
980 980
 					);
981 981
 					break;
982 982
 
983 983
 				case 'entry_id':
984
-					$updated_field['key'] = 'entry_id';
985
-					$updated_field['input'] = 'entry_id';
986
-					$updated_field['value'] = $this->rgget_or_rgpost( 'gv_id' );
984
+					$updated_field[ 'key' ] = 'entry_id';
985
+					$updated_field[ 'input' ] = 'entry_id';
986
+					$updated_field[ 'value' ] = $this->rgget_or_rgpost( 'gv_id' );
987 987
 					break;
988 988
 
989 989
 				case 'created_by':
990
-					$updated_field['key'] = 'created_by';
991
-					$updated_field['name'] = 'gv_by';
992
-					$updated_field['value'] = $this->rgget_or_rgpost( 'gv_by' );
993
-					$updated_field['choices'] = self::get_created_by_choices();
990
+					$updated_field[ 'key' ] = 'created_by';
991
+					$updated_field[ 'name' ] = 'gv_by';
992
+					$updated_field[ 'value' ] = $this->rgget_or_rgpost( 'gv_by' );
993
+					$updated_field[ 'choices' ] = self::get_created_by_choices();
994 994
 					break;
995 995
 			}
996 996
 
@@ -1009,16 +1009,16 @@  discard block
 block discarded – undo
1009 1009
 		 */
1010 1010
 		$gravityview_view->search_fields = apply_filters( 'gravityview_widget_search_filters', $search_fields, $this, $widget_args, $context );
1011 1011
 
1012
-		$gravityview_view->search_layout = ! empty( $widget_args['search_layout'] ) ? $widget_args['search_layout'] : 'horizontal';
1012
+		$gravityview_view->search_layout = ! empty( $widget_args[ 'search_layout' ] ) ? $widget_args[ 'search_layout' ] : 'horizontal';
1013 1013
 
1014 1014
 		/** @since 1.14 */
1015
-		$gravityview_view->search_mode = ! empty( $widget_args['search_mode'] ) ? $widget_args['search_mode'] : 'any';
1015
+		$gravityview_view->search_mode = ! empty( $widget_args[ 'search_mode' ] ) ? $widget_args[ 'search_mode' ] : 'any';
1016 1016
 
1017
-		$custom_class = ! empty( $widget_args['custom_class'] ) ? $widget_args['custom_class'] : '';
1017
+		$custom_class = ! empty( $widget_args[ 'custom_class' ] ) ? $widget_args[ 'custom_class' ] : '';
1018 1018
 
1019 1019
 		$gravityview_view->search_class = self::get_search_class( $custom_class );
1020 1020
 
1021
-		$gravityview_view->search_clear = ! empty( $widget_args['search_clear'] ) ? $widget_args['search_clear'] : false;
1021
+		$gravityview_view->search_clear = ! empty( $widget_args[ 'search_clear' ] ) ? $widget_args[ 'search_clear' ] : false;
1022 1022
 
1023 1023
 		if ( $this->has_date_field( $search_fields ) ) {
1024 1024
 			// enqueue datepicker stuff only if needed!
@@ -1040,10 +1040,10 @@  discard block
 block discarded – undo
1040 1040
 	public static function get_search_class( $custom_class = '' ) {
1041 1041
 		$gravityview_view = GravityView_View::getInstance();
1042 1042
 
1043
-		$search_class = 'gv-search-'.$gravityview_view->search_layout;
1043
+		$search_class = 'gv-search-' . $gravityview_view->search_layout;
1044 1044
 
1045
-		if ( ! empty( $custom_class )  ) {
1046
-			$search_class .= ' '.$custom_class;
1045
+		if ( ! empty( $custom_class ) ) {
1046
+			$search_class .= ' ' . $custom_class;
1047 1047
 		}
1048 1048
 
1049 1049
 		/**
@@ -1087,9 +1087,9 @@  discard block
 block discarded – undo
1087 1087
 
1088 1088
 		if ( ! $label ) {
1089 1089
 
1090
-			$label = isset( $form_field['label'] ) ? $form_field['label'] : '';
1090
+			$label = isset( $form_field[ 'label' ] ) ? $form_field[ 'label' ] : '';
1091 1091
 
1092
-			switch( $field['field'] ) {
1092
+			switch ( $field[ 'field' ] ) {
1093 1093
 				case 'search_all':
1094 1094
 					$label = __( 'Search Entries:', 'gravityview' );
1095 1095
 					break;
@@ -1101,10 +1101,10 @@  discard block
 block discarded – undo
1101 1101
 					break;
1102 1102
 				default:
1103 1103
 					// If this is a field input, not a field
1104
-					if ( strpos( $field['field'], '.' ) > 0 && ! empty( $form_field['inputs'] ) ) {
1104
+					if ( strpos( $field[ 'field' ], '.' ) > 0 && ! empty( $form_field[ 'inputs' ] ) ) {
1105 1105
 
1106 1106
 						// Get the label for the field in question, which returns an array
1107
-						$items = wp_list_filter( $form_field['inputs'], array( 'id' => $field['field'] ) );
1107
+						$items = wp_list_filter( $form_field[ 'inputs' ], array( 'id' => $field[ 'field' ] ) );
1108 1108
 
1109 1109
 						// Get the item with the `label` key
1110 1110
 						$values = wp_list_pluck( $items, 'label' );
@@ -1143,32 +1143,32 @@  discard block
 block discarded – undo
1143 1143
 		$form = $gravityview_view->getForm();
1144 1144
 
1145 1145
 		// for advanced field ids (eg, first name / last name )
1146
-		$name = 'filter_' . str_replace( '.', '_', $field['field'] );
1146
+		$name = 'filter_' . str_replace( '.', '_', $field[ 'field' ] );
1147 1147
 
1148 1148
 		// get searched value from $_GET/$_POST (string or array)
1149 1149
 		$value = $this->rgget_or_rgpost( $name );
1150 1150
 
1151 1151
 		// get form field details
1152
-		$form_field = gravityview_get_field( $form, $field['field'] );
1152
+		$form_field = gravityview_get_field( $form, $field[ 'field' ] );
1153 1153
 
1154 1154
 		$filter = array(
1155
-			'key' => $field['field'],
1155
+			'key' => $field[ 'field' ],
1156 1156
 			'name' => $name,
1157 1157
 			'label' => self::get_field_label( $field, $form_field ),
1158
-			'input' => $field['input'],
1158
+			'input' => $field[ 'input' ],
1159 1159
 			'value' => $value,
1160
-			'type' => $form_field['type'],
1160
+			'type' => $form_field[ 'type' ],
1161 1161
 		);
1162 1162
 
1163 1163
 		// collect choices
1164
-		if ( 'post_category' === $form_field['type'] && ! empty( $form_field['displayAllCategories'] ) && empty( $form_field['choices'] ) ) {
1165
-			$filter['choices'] = gravityview_get_terms_choices();
1166
-		} elseif ( ! empty( $form_field['choices'] ) ) {
1167
-			$filter['choices'] = $form_field['choices'];
1164
+		if ( 'post_category' === $form_field[ 'type' ] && ! empty( $form_field[ 'displayAllCategories' ] ) && empty( $form_field[ 'choices' ] ) ) {
1165
+			$filter[ 'choices' ] = gravityview_get_terms_choices();
1166
+		} elseif ( ! empty( $form_field[ 'choices' ] ) ) {
1167
+			$filter[ 'choices' ] = $form_field[ 'choices' ];
1168 1168
 		}
1169 1169
 
1170
-		if ( 'date_range' === $field['input'] && empty( $value ) ) {
1171
-			$filter['value'] = array( 'start' => '', 'end' => '' );
1170
+		if ( 'date_range' === $field[ 'input' ] && empty( $value ) ) {
1171
+			$filter[ 'value' ] = array( 'start' => '', 'end' => '' );
1172 1172
 		}
1173 1173
 
1174 1174
 		return $filter;
@@ -1192,7 +1192,7 @@  discard block
 block discarded – undo
1192 1192
 
1193 1193
 		$choices = array();
1194 1194
 		foreach ( $users as $user ) {
1195
-			$choices[] = array(
1195
+			$choices[ ] = array(
1196 1196
 				'value' => $user->ID,
1197 1197
 				'text' => $user->display_name,
1198 1198
 			);
@@ -1247,7 +1247,7 @@  discard block
 block discarded – undo
1247 1247
 	 */
1248 1248
 	public function add_datepicker_js_dependency( $js_dependencies ) {
1249 1249
 
1250
-		$js_dependencies[] = 'jquery-ui-datepicker';
1250
+		$js_dependencies[ ] = 'jquery-ui-datepicker';
1251 1251
 
1252 1252
 		return $js_dependencies;
1253 1253
 	}
@@ -1291,7 +1291,7 @@  discard block
 block discarded – undo
1291 1291
 			'isRTL'             => is_rtl(),
1292 1292
 		), $view_data );
1293 1293
 
1294
-		$localizations['datepicker'] = $datepicker_settings;
1294
+		$localizations[ 'datepicker' ] = $datepicker_settings;
1295 1295
 
1296 1296
 		return $localizations;
1297 1297
 
@@ -1318,7 +1318,7 @@  discard block
 block discarded – undo
1318 1318
 	 * @return void
1319 1319
 	 */
1320 1320
 	private function maybe_enqueue_flexibility() {
1321
-		if ( isset( $_SERVER['HTTP_USER_AGENT'] ) && preg_match( '/MSIE [8-9]/', $_SERVER['HTTP_USER_AGENT'] ) ) {
1321
+		if ( isset( $_SERVER[ 'HTTP_USER_AGENT' ] ) && preg_match( '/MSIE [8-9]/', $_SERVER[ 'HTTP_USER_AGENT' ] ) ) {
1322 1322
 			wp_enqueue_script( 'gv-flexibility' );
1323 1323
 		}
1324 1324
 	}
@@ -1340,7 +1340,7 @@  discard block
 block discarded – undo
1340 1340
 		add_filter( 'gravityview_js_localization', array( $this, 'add_datepicker_localization' ), 10, 2 );
1341 1341
 
1342 1342
 		$scheme = is_ssl() ? 'https://' : 'http://';
1343
-		wp_enqueue_style( 'jquery-ui-datepicker', $scheme.'ajax.googleapis.com/ajax/libs/jqueryui/1.8.18/themes/smoothness/jquery-ui.css' );
1343
+		wp_enqueue_style( 'jquery-ui-datepicker', $scheme . 'ajax.googleapis.com/ajax/libs/jqueryui/1.8.18/themes/smoothness/jquery-ui.css' );
1344 1344
 
1345 1345
 		/**
1346 1346
 		 * @filter `gravityview_search_datepicker_class`
Please login to merge, or discard this patch.