Completed
Push — develop ( ff5a31...35ce63 )
by Zack
19:52
created
future/includes/class-gv-request.php 1 patch
Spacing   +10 added lines, -10 removed lines patch added patch discarded remove patch
@@ -69,7 +69,7 @@  discard block
 block discarded – undo
69 69
 	 */
70 70
 	public static function is_add_oembed_preview() {
71 71
 		/** The preview request is a parse-embed AJAX call without a type set. */
72
-		return ( self::is_ajax() && ! empty( $_POST['action'] ) && $_POST['action'] == 'parse-embed' && ! isset( $_POST['type'] ) );
72
+		return ( self::is_ajax() && ! empty( $_POST[ 'action' ] ) && $_POST[ 'action' ] == 'parse-embed' && ! isset( $_POST[ 'type' ] ) );
73 73
 	}
74 74
 
75 75
 	/**
@@ -87,7 +87,7 @@  discard block
 block discarded – undo
87 87
 	 * @return boolean
88 88
 	 */
89 89
 	public static function is_rest() {
90
-		return ! empty( $GLOBALS['wp']->query_vars['rest_route'] );
90
+		return ! empty( $GLOBALS[ 'wp' ]->query_vars[ 'rest_route' ] );
91 91
 	}
92 92
 
93 93
 	/**
@@ -162,7 +162,7 @@  discard block
 block discarded – undo
162 162
 					return false;
163 163
 				}
164 164
 
165
-				if ( ! in_array( $e['form_id'], $valid_forms ) ) {
165
+				if ( ! in_array( $e[ 'form_id' ], $valid_forms ) ) {
166 166
 					return false;
167 167
 				}
168 168
 
@@ -178,7 +178,7 @@  discard block
 block discarded – undo
178 178
 			}
179 179
 
180 180
 			$entry = Multi_Entry::from_entries( array_filter( $multientry ) );
181
-		}  else {
181
+		} else {
182 182
 			/**
183 183
 			 * A regular one.
184 184
 			 */
@@ -236,15 +236,15 @@  discard block
 block discarded – undo
236 236
 			$get = $_GET;
237 237
 		}
238 238
 
239
-		unset( $get['mode'] );
239
+		unset( $get[ 'mode' ] );
240 240
 
241 241
 		$get = array_filter( $get, 'gravityview_is_not_empty_string' );
242 242
 
243
-		if( $this->_has_field_key( $get ) ) {
243
+		if ( $this->_has_field_key( $get ) ) {
244 244
 			return true;
245 245
 		}
246 246
 
247
-		return isset( $get['gv_search'] ) || isset( $get['gv_start'] ) || isset( $get['gv_end'] ) || isset( $get['gv_by'] ) || isset( $get['gv_id'] );
247
+		return isset( $get[ 'gv_search' ] ) || isset( $get[ 'gv_start' ] ) || isset( $get[ 'gv_end' ] ) || isset( $get[ 'gv_by' ] ) || isset( $get[ 'gv_id' ] );
248 248
 	}
249 249
 
250 250
 	/**
@@ -267,13 +267,13 @@  discard block
 block discarded – undo
267 267
 
268 268
 		$meta = array();
269 269
 		foreach ( $fields as $field ) {
270
-			if( empty( $field->_gf_field_class_name ) ) {
271
-				$meta[] = preg_quote( $field->name );
270
+			if ( empty( $field->_gf_field_class_name ) ) {
271
+				$meta[ ] = preg_quote( $field->name );
272 272
 			}
273 273
 		}
274 274
 
275 275
 		foreach ( $get as $key => $value ) {
276
-			if ( preg_match('/^(filter|input)_(([0-9_]+)|'. implode( '|', $meta ) .')$/sm', $key ) ) {
276
+			if ( preg_match( '/^(filter|input)_(([0-9_]+)|' . implode( '|', $meta ) . ')$/sm', $key ) ) {
277 277
 				$has_field_key = true;
278 278
 				break;
279 279
 			}
Please login to merge, or discard this patch.