Completed
Push — develop ( 02ea79...828be0 )
by Zack
25:27 queued 05:23
created
future/includes/class-gv-request.php 1 patch
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -45,7 +45,7 @@  discard block
 block discarded – undo
45 45
 	 */
46 46
 	public static function is_add_oembed_preview() {
47 47
 		/** The preview request is a parse-embed AJAX call without a type set. */
48
-		return ( self::is_ajax() && ! empty( $_POST['action'] ) && $_POST['action'] == 'parse-embed' && ! isset( $_POST['type'] ) );
48
+		return ( self::is_ajax() && ! empty( $_POST[ 'action' ] ) && $_POST[ 'action' ] == 'parse-embed' && ! isset( $_POST[ 'type' ] ) );
49 49
 	}
50 50
 
51 51
 	/**
@@ -63,7 +63,7 @@  discard block
 block discarded – undo
63 63
 	 * @return boolean
64 64
 	 */
65 65
 	public static function is_rest() {
66
-		return ! empty( $GLOBALS['wp']->query_vars['rest_route'] );
66
+		return ! empty( $GLOBALS[ 'wp' ]->query_vars[ 'rest_route' ] );
67 67
 	}
68 68
 
69 69
 	/**
@@ -141,15 +141,15 @@  discard block
 block discarded – undo
141 141
 			$get = $_GET;
142 142
 		}
143 143
 
144
-		unset( $get['mode'] );
144
+		unset( $get[ 'mode' ] );
145 145
 
146 146
 		$get = array_filter( $get, 'gravityview_is_not_empty_string' );
147 147
 
148
-		if( $has_field_key = $this->_has_field_key( $get ) ) {
148
+		if ( $has_field_key = $this->_has_field_key( $get ) ) {
149 149
 			return true;
150 150
 		}
151 151
 
152
-		return isset( $get['gv_search'] ) || isset( $get['gv_start'] ) || isset( $get['gv_end'] ) || isset( $get['gv_by'] ) || isset( $get['gv_id'] );
152
+		return isset( $get[ 'gv_search' ] ) || isset( $get[ 'gv_start' ] ) || isset( $get[ 'gv_end' ] ) || isset( $get[ 'gv_by' ] ) || isset( $get[ 'gv_id' ] );
153 153
 	}
154 154
 
155 155
 	/**
@@ -172,13 +172,13 @@  discard block
 block discarded – undo
172 172
 
173 173
 		$meta = array();
174 174
 		foreach ( $fields as $field ) {
175
-			if( empty( $field->_gf_field_class_name ) ) {
176
-				$meta[] = preg_quote( $field->name );
175
+			if ( empty( $field->_gf_field_class_name ) ) {
176
+				$meta[ ] = preg_quote( $field->name );
177 177
 			}
178 178
 		}
179 179
 
180 180
 		foreach ( $get as $key => $value ) {
181
-			if ( preg_match('/^filter_(([0-9_]+)|'. implode( '|', $meta ) .')$/sm', $key ) ) {
181
+			if ( preg_match( '/^filter_(([0-9_]+)|' . implode( '|', $meta ) . ')$/sm', $key ) ) {
182 182
 				$has_field_key = true;
183 183
 				break;
184 184
 			}
Please login to merge, or discard this patch.