@@ -2,7 +2,9 @@ |
||
| 2 | 2 | namespace GV; |
| 3 | 3 | |
| 4 | 4 | // Exit if accessed directly |
| 5 | -if ( ! defined( 'ABSPATH' ) ) exit; |
|
| 5 | +if ( ! defined( 'ABSPATH' ) ) { |
|
| 6 | + exit; |
|
| 7 | +} |
|
| 6 | 8 | |
| 7 | 9 | /** |
| 8 | 10 | * Allows plugins to use their own update API. |
@@ -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; |
@@ -1372,11 +1372,4 @@ |
||
| 1372 | 1372 | */ |
| 1373 | 1373 | $datepicker_class = apply_filters( 'gravityview_search_datepicker_class', 'gv-datepicker datepicker mdy' ); |
| 1374 | 1374 | |
| 1375 | - $gravityview_view->datepicker_class = $datepicker_class; |
|
| 1376 | - |
|
| 1377 | - } |
|
| 1378 | - |
|
| 1379 | - |
|
| 1380 | -} // end class |
|
| 1381 | - |
|
| 1382 | -new GravityView_Widget_Search; |
|
| 1375 | + $gravityview_view->datepicker_class = $datepicker_class |
|
| 1383 | 1376 | \ No newline at end of file |
@@ -945,7 +945,7 @@ discard block |
||
| 945 | 945 | |
| 946 | 946 | $back_link = esc_url( remove_query_arg( array( 'page', 'view', 'edit' ) ) ); |
| 947 | 947 | |
| 948 | - if( ! $this->is_valid ){ |
|
| 948 | + if( ! $this->is_valid ) { |
|
| 949 | 949 | |
| 950 | 950 | // Keeping this compatible with Gravity Forms. |
| 951 | 951 | $validation_message = "<div class='validation_error'>" . __('There was a problem with your submission.', 'gravityview') . " " . __('Errors have been highlighted below.', 'gravityview') . "</div>"; |
@@ -2037,9 +2037,4 @@ discard block |
||
| 2037 | 2037 | return implode( ',', $maybe_json ); |
| 2038 | 2038 | } |
| 2039 | 2039 | |
| 2040 | - return $field_value; |
|
| 2041 | - } |
|
| 2042 | - |
|
| 2043 | - |
|
| 2044 | - |
|
| 2045 | -} //end class |
|
| 2040 | + return $field_value |
|
| 2046 | 2041 | \ No newline at end of file |