@@ -291,7 +291,7 @@ |
||
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 |
@@ -79,8 +79,9 @@ |
||
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': |
@@ -230,8 +230,9 @@ |
||
230 | 230 | * Check permissions. |
231 | 231 | */ |
232 | 232 | while ( $error = $view->can_render( null, $request ) ) { |
233 | - if ( ! is_wp_error( $error ) ) |
|
234 | - break; |
|
233 | + if ( ! is_wp_error( $error ) ) { |
|
234 | + break; |
|
235 | + } |
|
235 | 236 | |
236 | 237 | switch ( str_replace( 'gravityview/', '', $error->get_error_code() ) ) { |
237 | 238 | case 'post_password_required': |
@@ -449,9 +449,7 @@ |
||
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' ); |
@@ -1380,7 +1380,7 @@ discard block |
||
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 |
||
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 |
@@ -573,7 +573,8 @@ discard block |
||
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 |
||
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 |
||
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 |
@@ -451,7 +451,7 @@ discard block |
||
451 | 451 | } |
452 | 452 | |
453 | 453 | // WooCommerce doesn't $post_id |
454 | - if ( empty( $passed_post_id ) ) { |
|
454 | + if ( empty( $passed_post_id ) ) { |
|
455 | 455 | return $passed_title; |
456 | 456 | } |
457 | 457 | |
@@ -1206,7 +1206,7 @@ discard block |
||
1206 | 1206 | */ |
1207 | 1207 | $address_part = apply_filters( 'gravityview/sorting/address', 'city', $sort_field_id, $form_id ); |
1208 | 1208 | |
1209 | - switch( strtolower( $address_part ) ){ |
|
1209 | + switch( strtolower( $address_part ) ) { |
|
1210 | 1210 | case 'street': |
1211 | 1211 | $sort_field_id .= '.1'; |
1212 | 1212 | break; |
@@ -1296,7 +1296,7 @@ discard block |
||
1296 | 1296 | */ |
1297 | 1297 | $single_entry = apply_filters( 'gravityview/is_single_entry', $single_entry ); |
1298 | 1298 | |
1299 | - if ( empty( $single_entry ) ){ |
|
1299 | + if ( empty( $single_entry ) ) { |
|
1300 | 1300 | return false; |
1301 | 1301 | } else { |
1302 | 1302 | return $single_entry; |
@@ -173,7 +173,7 @@ |
||
173 | 173 | } |
174 | 174 | |
175 | 175 | $entry = Multi_Entry::from_entries( array_filter( $multientry ) ); |
176 | - } else { |
|
176 | + } else { |
|
177 | 177 | /** |
178 | 178 | * A regular one. |
179 | 179 | */ |
@@ -10,7 +10,9 @@ |
||
10 | 10 | */ |
11 | 11 | |
12 | 12 | // Exit if accessed directly |
13 | -if ( ! defined( 'ABSPATH' ) ) exit; |
|
13 | +if ( ! defined( 'ABSPATH' ) ) { |
|
14 | + exit; |
|
15 | +} |
|
14 | 16 | |
15 | 17 | /** |
16 | 18 | * Allows plugins to use their own update API. |