@@ -284,7 +284,7 @@ |
||
| 284 | 284 | */ |
| 285 | 285 | public function settings() { |
| 286 | 286 | // If doing ajax, get outta here |
| 287 | - if ( ! is_admin() || ( defined( 'DOING_AJAX' ) && DOING_AJAX ) ) { |
|
| 287 | + if ( ! is_admin() || ( defined( 'DOING_AJAX' ) && DOING_AJAX ) ) { |
|
| 288 | 288 | return; |
| 289 | 289 | } |
| 290 | 290 | |
@@ -174,7 +174,8 @@ discard block |
||
| 174 | 174 | if ( empty( $license_data ) ) { |
| 175 | 175 | if ( $is_ajax ) { |
| 176 | 176 | exit( json_encode( array() ) ); |
| 177 | - } else { // Non-ajax call |
|
| 177 | + } else { |
|
| 178 | +// Non-ajax call |
|
| 178 | 179 | return json_encode( array() ); |
| 179 | 180 | } |
| 180 | 181 | } |
@@ -207,7 +208,8 @@ discard block |
||
| 207 | 208 | |
| 208 | 209 | if ( $is_ajax ) { |
| 209 | 210 | exit( $json ); |
| 210 | - } else { // Non-ajax call |
|
| 211 | + } else { |
|
| 212 | +// Non-ajax call |
|
| 211 | 213 | return ( Utils::_GET( 'format', Utils::get( $data, 'format' ) ) === 'object' ) ? $license_data : $json; |
| 212 | 214 | } |
| 213 | 215 | } |
@@ -244,7 +244,7 @@ discard block |
||
| 244 | 244 | * @deprecated use gravityview()->log |
| 245 | 245 | * @return void |
| 246 | 246 | */ |
| 247 | - public static function log_debug( $message, $data = null ){ |
|
| 247 | + public static function log_debug( $message, $data = null ) { |
|
| 248 | 248 | gravityview()->log->notice( '\GravityView_Plugin is deprecated. Use \GV\Plugin instead.' ); |
| 249 | 249 | gravityview()->log->debug( $message, $data ); |
| 250 | 250 | } |
@@ -255,7 +255,7 @@ discard block |
||
| 255 | 255 | * @deprecated use gravityview()->log |
| 256 | 256 | * @return void |
| 257 | 257 | */ |
| 258 | - public static function log_error( $message, $data = null ){ |
|
| 258 | + public static function log_error( $message, $data = null ) { |
|
| 259 | 259 | gravityview()->log->notice( '\GravityView_Plugin is deprecated. Use \GV\Plugin instead.' ); |
| 260 | 260 | gravityview()->log->error( $message, $data ); |
| 261 | 261 | } |
@@ -1324,7 +1324,7 @@ discard block |
||
| 1324 | 1324 | $placeholders['label_value'] = gv_label( $field, $entry ); |
| 1325 | 1325 | } |
| 1326 | 1326 | |
| 1327 | - if ( empty( $placeholders['label'] ) && ! empty( $placeholders['label_value'] ) ){ |
|
| 1327 | + if ( empty( $placeholders['label'] ) && ! empty( $placeholders['label_value'] ) ) { |
|
| 1328 | 1328 | $placeholders['label'] = '<span class="gv-field-label">{{ label_value }}</span>'; |
| 1329 | 1329 | } |
| 1330 | 1330 | |
@@ -1363,7 +1363,7 @@ discard block |
||
| 1363 | 1363 | foreach ( $placeholders as $tag => $value ) { |
| 1364 | 1364 | |
| 1365 | 1365 | // If the tag doesn't exist just skip it |
| 1366 | - if ( false === strpos( $html, $open_tag . $tag . $close_tag ) && false === strpos( $html, $open_tag . ' ' . $tag . ' ' . $close_tag ) ){ |
|
| 1366 | + if ( false === strpos( $html, $open_tag . $tag . $close_tag ) && false === strpos( $html, $open_tag . ' ' . $tag . ' ' . $close_tag ) ) { |
|
| 1367 | 1367 | continue; |
| 1368 | 1368 | } |
| 1369 | 1369 | |
@@ -450,7 +450,7 @@ discard block |
||
| 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 |
||
| 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 |
||
| 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; |