Completed
Pull Request — develop (#1404)
by Gennady
06:10
created
includes/class-frontend-views.php 1 patch
Braces   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -450,7 +450,7 @@  discard block
 block discarded – undo
450 450
 		}
451 451
 
452 452
 		// User reported WooCommerce doesn't pass two args.
453
-		if ( empty( $passed_post_id ) )  {
453
+		if ( empty( $passed_post_id ) ) {
454 454
 			return $title;
455 455
 		}
456 456
 
@@ -1127,7 +1127,7 @@  discard block
 block discarded – undo
1127 1127
 					 */
1128 1128
 					$address_part = apply_filters( 'gravityview/sorting/address', 'city', $sort_field_id, $form_id );
1129 1129
 
1130
-					switch( strtolower( $address_part ) ){
1130
+					switch( strtolower( $address_part ) ) {
1131 1131
 						case 'street':
1132 1132
 							$sort_field_id .= '.1';
1133 1133
 							break;
@@ -1207,7 +1207,7 @@  discard block
 block discarded – undo
1207 1207
 		 */
1208 1208
 		$single_entry = apply_filters( 'gravityview/is_single_entry', $single_entry );
1209 1209
 
1210
-		if ( empty( $single_entry ) ){
1210
+		if ( empty( $single_entry ) ) {
1211 1211
 			return false;
1212 1212
 		} else {
1213 1213
 			return $single_entry;
Please login to merge, or discard this patch.
includes/widgets/search-widget/class-search-widget.php 1 patch
Braces   +3 added lines, -2 removed lines patch added patch discarded remove patch
@@ -603,7 +603,8 @@  discard block
 block discarded – undo
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 605
 				$search_criteria['end_date'] = $adjust_tz ? get_gmt_from_date( $curr_end ) : $curr_end;
606
-				if ( strpos( $search_criteria['end_date'], '00:00:00' ) ) { // See https://github.com/gravityview/GravityView/issues/1056
606
+				if ( strpos( $search_criteria['end_date'], '00:00:00' ) ) {
607
+// See https://github.com/gravityview/GravityView/issues/1056
607 608
 					$search_criteria['end_date'] = date( 'Y-m-d H:i:s', strtotime( $search_criteria['end_date'] ) - 1 );
608 609
 				}
609 610
 			}
@@ -874,7 +875,7 @@  discard block
 block discarded – undo
874 875
 			'ymd_dot' => 'Y.m.d',
875 876
 		);
876 877
 
877
-		if ( ! empty( $field->dateFormat ) && isset( $datepicker[ $field->dateFormat ] ) ){
878
+		if ( ! empty( $field->dateFormat ) && isset( $datepicker[ $field->dateFormat ] ) ) {
878 879
 			$format = $datepicker[ $field->dateFormat ];
879 880
 		}
880 881
 
Please login to merge, or discard this patch.
future/includes/class-gv-extension.php 1 patch
Braces   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -291,7 +291,7 @@
 block discarded – undo
291 291
 	public function settings() {
292 292
 
293 293
 		// If doing ajax, get outta here
294
-		if ( ! is_admin() || ( defined( 'DOING_AJAX' ) && DOING_AJAX && 'update-plugin' !== Utils::_POST('action') ) )  {
294
+		if ( ! is_admin() || ( defined( 'DOING_AJAX' ) && DOING_AJAX && 'update-plugin' !== Utils::_POST('action') ) ) {
295 295
 			return;
296 296
 		}
297 297
 
Please login to merge, or discard this patch.
future/includes/class-gv-shortcode-gravityview.php 1 patch
Braces   +3 added lines, -2 removed lines patch added patch discarded remove patch
@@ -79,8 +79,9 @@
 block discarded – undo
79 79
 		 * Check permissions.
80 80
 		 */
81 81
 		while ( $error = $view->can_render( array( 'shortcode' ), $request ) ) {
82
-			if ( ! is_wp_error( $error ) )
83
-				break;
82
+			if ( ! is_wp_error( $error ) ) {
83
+							break;
84
+			}
84 85
 
85 86
 			switch ( str_replace( 'gravityview/', '', $error->get_error_code() ) ) {
86 87
 				case 'post_password_required':
Please login to merge, or discard this patch.
future/includes/class-gv-view.php 1 patch
Braces   +4 added lines, -3 removed lines patch added patch discarded remove patch
@@ -209,7 +209,7 @@  discard block
 block discarded – undo
209 209
 		$slug = apply_filters( 'gravityview_slug', 'view' );
210 210
 		$rule = array( sprintf( '%s/([^/]+)/csv/?', $slug ), 'index.php?gravityview=$matches[1]&csv=1', 'top' );
211 211
 
212
-		add_filter( 'query_vars', function( $query_vars ) { 
212
+		add_filter( 'query_vars', function( $query_vars ) {
213 213
 			$query_vars[] = 'csv';
214 214
 			return $query_vars;
215 215
 		} );
@@ -254,8 +254,9 @@  discard block
 block discarded – undo
254 254
 		 * Check permissions.
255 255
 		 */
256 256
 		while ( $error = $view->can_render( null, $request ) ) {
257
-			if ( ! is_wp_error( $error ) )
258
-				break;
257
+			if ( ! is_wp_error( $error ) ) {
258
+							break;
259
+			}
259 260
 
260 261
 			switch ( str_replace( 'gravityview/', '', $error->get_error_code() ) ) {
261 262
 				case 'post_password_required':
Please login to merge, or discard this patch.
includes/class-admin-installer.php 1 patch
Braces   +1 added lines, -3 removed lines patch added patch discarded remove patch
@@ -449,9 +449,7 @@
 block discarded – undo
449 449
 			$button_label = sprintf( __( 'Upgrade to %s for Access', 'gravityview' ), $required_license );
450 450
 			$button_class = 'button-primary button-large';
451 451
 			$href         = 'https://gravityview.co/pricing/?utm_source=admin-installer&utm_medium=admin&utm_campaign=Admin%20Notice&utm_content=' . $required_license;
452
-		}
453
-
454
-        elseif ( ! empty( $download_info['coming_soon'] ) ) {
452
+		} elseif ( ! empty( $download_info['coming_soon'] ) ) {
455 453
 	        $spinner      = false;
456 454
 	        $status       = 'notinstalled';
457 455
 	        $status_label = __( 'Coming Soon', 'gravityview' );
Please login to merge, or discard this patch.
includes/class-api.php 1 patch
Braces   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -1380,7 +1380,7 @@  discard block
 block discarded – undo
1380 1380
 	$placeholders['label_value:data-label'] = trim( esc_attr( strip_tags( str_replace( '> ', '>', $placeholders['label_value'] ) ) ) );
1381 1381
 	$placeholders['label_value:esc_attr'] = esc_attr( $placeholders['label_value'] );
1382 1382
 
1383
-	if ( empty( $placeholders['label'] ) && ! empty( $placeholders['label_value'] ) ){
1383
+	if ( empty( $placeholders['label'] ) && ! empty( $placeholders['label_value'] ) ) {
1384 1384
 		$placeholders['label'] = '<span class="gv-field-label">{{ label_value }}</span>';
1385 1385
 	}
1386 1386
 
@@ -1419,7 +1419,7 @@  discard block
 block discarded – undo
1419 1419
 	foreach ( $placeholders as $tag => $value ) {
1420 1420
 
1421 1421
 		// If the tag doesn't exist just skip it
1422
-		if ( false === strpos( $html, $open_tag . $tag . $close_tag ) && false === strpos( $html, $open_tag . ' ' . $tag . ' ' . $close_tag ) ){
1422
+		if ( false === strpos( $html, $open_tag . $tag . $close_tag ) && false === strpos( $html, $open_tag . ' ' . $tag . ' ' . $close_tag ) ) {
1423 1423
 			continue;
1424 1424
 		}
1425 1425
 
Please login to merge, or discard this patch.
future/includes/class-gv-request.php 1 patch
Braces   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -140,7 +140,7 @@
 block discarded – undo
140 140
 				}
141 141
 
142 142
 				$entry = Multi_Entry::from_entries( array_filter( $multientry ) );
143
-			}  else {
143
+			} else {
144 144
 				/**
145 145
 				 * A regular one.
146 146
 				 */
Please login to merge, or discard this patch.
includes/extensions/edit-entry/class-edit-entry-render.php 1 patch
Braces   +4 added lines, -5 removed lines patch added patch discarded remove patch
@@ -573,7 +573,8 @@  discard block
 block discarded – undo
573 573
 
574 574
 							// Only allow quantity to be set if it's allowed to be edited
575 575
 							if ( in_array( $field_id, $allowed_fields ) && $input_id == 3 ) {
576
-							} else { // otherwise set to what it previously was
576
+							} else {
577
+// otherwise set to what it previously was
577 578
 								$_POST[ $input_name ] = $entry[ $input['id'] ];
578 579
 							}
579 580
 						} else {
@@ -958,7 +959,7 @@  discard block
 block discarded – undo
958 959
 
959 960
 			$back_link = remove_query_arg( array( 'page', 'view', 'edit' ) );
960 961
 
961
-			if( ! $this->is_valid ){
962
+			if( ! $this->is_valid ) {
962 963
 
963 964
 				// Keeping this compatible with Gravity Forms.
964 965
 				$validation_message = "<div class='validation_error'>" . __('There was a problem with your submission.', 'gravityview') . " " . __('Errors have been highlighted below.', 'gravityview') . "</div>";
@@ -2070,9 +2071,7 @@  discard block
 block discarded – undo
2070 2071
 		// Verify
2071 2072
 		else if( ! $this->is_edit_entry() ) {
2072 2073
 			$valid = false;
2073
-		}
2074
-
2075
-		else {
2074
+		} else {
2076 2075
 			$valid = wp_verify_nonce( $_GET['edit'], self::$nonce_key );
2077 2076
 		}
2078 2077
 
Please login to merge, or discard this patch.