Completed
Push — develop ( 0c0247...72e40e )
by Gennady
15:56
created
future/includes/class-gv-entry.php 1 patch
Spacing   +11 added lines, -11 removed lines patch added patch discarded remove patch
@@ -47,11 +47,11 @@  discard block
 block discarded – undo
47 47
 		$rule = array( sprintf( '%s/([^/]+)/%s(/(.*))?/?$', $slug, $endpoint ), sprintf( 'index.php?gravityview=$matches[1]&%s=$matches[3]', $endpoint ), 'top' );
48 48
 
49 49
 		add_filter( 'query_vars', function( $query_vars ) use ( $endpoint ) {
50
-			$query_vars[] = $endpoint;
50
+			$query_vars[ ] = $endpoint;
51 51
 			return $query_vars;
52 52
 		} );
53 53
 
54
-		if ( ! isset( $wp_rewrite->extra_rules_top[ $rule[0] ] ) ) {
54
+		if ( ! isset( $wp_rewrite->extra_rules_top[ $rule[ 0 ] ] ) ) {
55 55
 			call_user_func_array( 'add_rewrite_rule', $rule );
56 56
 		}
57 57
 	}
@@ -117,7 +117,7 @@  discard block
 block discarded – undo
117 117
 
118 118
 		$args = array();
119 119
 
120
-		$view_id = is_null ( $view ) ? null : $view->ID;
120
+		$view_id = is_null( $view ) ? null : $view->ID;
121 121
 
122 122
 		$permalink = null;
123 123
 
@@ -130,8 +130,8 @@  discard block
 block discarded – undo
130 130
 
131 131
 				$view_collection = View_Collection::from_post( $post );
132 132
 
133
-				if( 1 < $view_collection->count() ) {
134
-					$args['gvid'] = $view_id;
133
+				if ( 1 < $view_collection->count() ) {
134
+					$args[ 'gvid' ] = $view_id;
135 135
 				}
136 136
 			}
137 137
 		}
@@ -160,21 +160,21 @@  discard block
 block discarded – undo
160 160
 			 */
161 161
 			$link_parts = explode( '?', $permalink );
162 162
 
163
-			$query = ! empty( $link_parts[1] ) ? '?' . $link_parts[1] : '';
163
+			$query = ! empty( $link_parts[ 1 ] ) ? '?' . $link_parts[ 1 ] : '';
164 164
 
165
-			$permalink = trailingslashit( $link_parts[0] ) . $entry_endpoint_name . '/'. $entry_slug .'/' . $query;
165
+			$permalink = trailingslashit( $link_parts[ 0 ] ) . $entry_endpoint_name . '/' . $entry_slug . '/' . $query;
166 166
 		} else {
167 167
 			$args[ $entry_endpoint_name ] = $entry_slug;
168 168
 		}
169 169
 
170 170
 		if ( $track_directory ) {
171
-			if ( ! empty( $_GET['pagenum'] ) ) {
172
-				$args['pagenum'] = intval( $_GET['pagenum'] );
171
+			if ( ! empty( $_GET[ 'pagenum' ] ) ) {
172
+				$args[ 'pagenum' ] = intval( $_GET[ 'pagenum' ] );
173 173
 			}
174 174
 
175 175
 			if ( $sort = Utils::_GET( 'sort' ) ) {
176
-				$args['sort'] = $sort;
177
-				$args['dir'] = Utils::_GET( 'dir' );
176
+				$args[ 'sort' ] = $sort;
177
+				$args[ 'dir' ] = Utils::_GET( 'dir' );
178 178
 			}
179 179
 		}
180 180
 
Please login to merge, or discard this patch.