@@ -171,11 +171,13 @@ |
||
| 171 | 171 | $public_display['nickname'] = $profileuser->nickname; |
| 172 | 172 | $public_display['username'] = $profileuser->user_login; |
| 173 | 173 | |
| 174 | - if ( !empty($profileuser->first_name) ) |
|
| 175 | - $public_display['firstname'] = $profileuser->first_name; |
|
| 174 | + if ( !empty($profileuser->first_name) ) { |
|
| 175 | + $public_display['firstname'] = $profileuser->first_name; |
|
| 176 | + } |
|
| 176 | 177 | |
| 177 | - if ( !empty($profileuser->last_name) ) |
|
| 178 | - $public_display['lastname'] = $profileuser->last_name; |
|
| 178 | + if ( !empty($profileuser->last_name) ) { |
|
| 179 | + $public_display['lastname'] = $profileuser->last_name; |
|
| 180 | + } |
|
| 179 | 181 | |
| 180 | 182 | if ( !empty($profileuser->first_name) && !empty($profileuser->last_name) ) { |
| 181 | 183 | $public_display['firstlast'] = $profileuser->first_name . ' ' . $profileuser->last_name; |
@@ -4,7 +4,9 @@ |
||
| 4 | 4 | //set_site_transient( 'update_plugins', null ); |
| 5 | 5 | |
| 6 | 6 | // Exit if accessed directly |
| 7 | -if ( ! defined( 'ABSPATH' ) ) exit; |
|
| 7 | +if ( ! defined( 'ABSPATH' ) ) { |
|
| 8 | + exit; |
|
| 9 | +} |
|
| 8 | 10 | |
| 9 | 11 | /** |
| 10 | 12 | * Allows plugins to use their own update API. |
@@ -351,7 +351,7 @@ discard block |
||
| 351 | 351 | * @param mixed $data Additional data to display |
| 352 | 352 | * @return void |
| 353 | 353 | */ |
| 354 | - public static function log_debug( $message, $data = null ){ |
|
| 354 | + public static function log_debug( $message, $data = null ) { |
|
| 355 | 355 | /** |
| 356 | 356 | * @action `gravityview_log_debug` Log a debug message that shows up in the Gravity Forms Logging Addon and also the Debug Bar plugin output |
| 357 | 357 | * @param string $message Message to display |
@@ -365,7 +365,7 @@ discard block |
||
| 365 | 365 | * @param string $message log message |
| 366 | 366 | * @return void |
| 367 | 367 | */ |
| 368 | - public static function log_error( $message, $data = null ){ |
|
| 368 | + public static function log_error( $message, $data = null ) { |
|
| 369 | 369 | /** |
| 370 | 370 | * @action `gravityview_log_error` Log an error message that shows up in the Gravity Forms Logging Addon and also the Debug Bar plugin output |
| 371 | 371 | * @param string $message Error message to display |
@@ -241,7 +241,7 @@ discard block |
||
| 241 | 241 | */ |
| 242 | 242 | $this->context_view_id = $_GET['gvid']; |
| 243 | 243 | |
| 244 | - } elseif ( ! $this->getGvOutputData()->has_multiple_views() ) { |
|
| 244 | + } elseif ( ! $this->getGvOutputData()->has_multiple_views() ) { |
|
| 245 | 245 | $array_keys = array_keys( $this->getGvOutputData()->get_views() ); |
| 246 | 246 | $this->context_view_id = array_pop( $array_keys ); |
| 247 | 247 | unset( $array_keys ); |
@@ -269,7 +269,7 @@ discard block |
||
| 269 | 269 | global $post; |
| 270 | 270 | |
| 271 | 271 | // If in admin and NOT AJAX request, get outta here. |
| 272 | - if ( GravityView_Plugin::is_admin() ) { |
|
| 272 | + if ( GravityView_Plugin::is_admin() ) { |
|
| 273 | 273 | return; |
| 274 | 274 | } |
| 275 | 275 | |
@@ -372,7 +372,7 @@ discard block |
||
| 372 | 372 | } |
| 373 | 373 | |
| 374 | 374 | // User reported WooCommerce doesn't pass two args. |
| 375 | - if ( empty( $passed_post_id ) ) { |
|
| 375 | + if ( empty( $passed_post_id ) ) { |
|
| 376 | 376 | return $title; |
| 377 | 377 | } |
| 378 | 378 | |
@@ -1108,7 +1108,7 @@ discard block |
||
| 1108 | 1108 | */ |
| 1109 | 1109 | $address_part = apply_filters( 'gravityview/sorting/address', 'city', $sort_field_id, $form_id ); |
| 1110 | 1110 | |
| 1111 | - switch( strtolower( $address_part ) ){ |
|
| 1111 | + switch( strtolower( $address_part ) ) { |
|
| 1112 | 1112 | case 'street': |
| 1113 | 1113 | $sort_field_id .= '.1'; |
| 1114 | 1114 | break; |
@@ -1188,7 +1188,7 @@ discard block |
||
| 1188 | 1188 | */ |
| 1189 | 1189 | $single_entry = apply_filters( 'gravityview/is_single_entry', $single_entry ); |
| 1190 | 1190 | |
| 1191 | - if ( empty( $single_entry ) ){ |
|
| 1191 | + if ( empty( $single_entry ) ) { |
|
| 1192 | 1192 | return false; |
| 1193 | 1193 | } else { |
| 1194 | 1194 | return $single_entry; |
@@ -295,7 +295,8 @@ discard block |
||
| 295 | 295 | if ( empty( $license_data ) ) { |
| 296 | 296 | if ( $is_ajax ) { |
| 297 | 297 | exit( json_encode( array() ) ); |
| 298 | - } else { // Non-ajax call |
|
| 298 | + } else { |
|
| 299 | +// Non-ajax call |
|
| 299 | 300 | return json_encode( array() ); |
| 300 | 301 | } |
| 301 | 302 | } |
@@ -325,7 +326,8 @@ discard block |
||
| 325 | 326 | |
| 326 | 327 | if ( $is_ajax ) { |
| 327 | 328 | exit( $json ); |
| 328 | - } else { // Non-ajax call |
|
| 329 | + } else { |
|
| 330 | +// Non-ajax call |
|
| 329 | 331 | return ( rgget('format', $data ) === 'object' ) ? $license_data : $json; |
| 330 | 332 | } |
| 331 | 333 | } |
@@ -1191,7 +1191,7 @@ discard block |
||
| 1191 | 1191 | // Default Label value |
| 1192 | 1192 | $context['label_value'] = gv_label( $args['field'], $entry ); |
| 1193 | 1193 | |
| 1194 | - if ( empty( $context['label'] ) && ! empty( $context['label_value'] ) ){ |
|
| 1194 | + if ( empty( $context['label'] ) && ! empty( $context['label_value'] ) ) { |
|
| 1195 | 1195 | $context['label'] = '<span class="gv-field-label">{{ label_value }}</span>'; |
| 1196 | 1196 | } |
| 1197 | 1197 | |
@@ -1224,7 +1224,7 @@ discard block |
||
| 1224 | 1224 | foreach ( $context as $tag => $value ) { |
| 1225 | 1225 | |
| 1226 | 1226 | // If the tag doesn't exist just skip it |
| 1227 | - if ( false === strpos( $html, $open_tag . $tag . $close_tag ) && false === strpos( $html, $open_tag . ' ' . $tag . ' ' . $close_tag ) ){ |
|
| 1227 | + if ( false === strpos( $html, $open_tag . $tag . $close_tag ) && false === strpos( $html, $open_tag . ' ' . $tag . ' ' . $close_tag ) ) { |
|
| 1228 | 1228 | continue; |
| 1229 | 1229 | } |
| 1230 | 1230 | |
@@ -270,7 +270,7 @@ discard block |
||
| 270 | 270 | * |
| 271 | 271 | * @return void |
| 272 | 272 | */ |
| 273 | - public function add_custom_column_content( $column_name = NULL, $post_id ) { |
|
| 273 | + public function add_custom_column_content( $column_name = NULL, $post_id ) { |
|
| 274 | 274 | |
| 275 | 275 | $output = ''; |
| 276 | 276 | |
@@ -429,7 +429,7 @@ discard block |
||
| 429 | 429 | */ |
| 430 | 430 | function save_postdata( $post_id ) { |
| 431 | 431 | |
| 432 | - if( defined( 'DOING_AUTOSAVE' ) && DOING_AUTOSAVE ){ |
|
| 432 | + if( defined( 'DOING_AUTOSAVE' ) && DOING_AUTOSAVE ) { |
|
| 433 | 433 | return; |
| 434 | 434 | } |
| 435 | 435 | |
@@ -72,7 +72,7 @@ |
||
| 72 | 72 | foreach ( $passed_post as &$post) { |
| 73 | 73 | if( ( get_post_type( $post ) === 'gravityview' ) ) { |
| 74 | 74 | $ids[] = $post->ID; |
| 75 | - } else{ |
|
| 75 | + } else { |
|
| 76 | 76 | // Parse the Post Content |
| 77 | 77 | $id = $this->parse_post_content( $post->post_content ); |
| 78 | 78 | if( $id ) { |
@@ -622,7 +622,7 @@ |
||
| 622 | 622 | 'ymd_dot' => 'Y.m.d', |
| 623 | 623 | ); |
| 624 | 624 | |
| 625 | - if ( ! empty( $field->dateFormat ) && isset( $datepicker[ $field->dateFormat ] ) ){ |
|
| 625 | + if ( ! empty( $field->dateFormat ) && isset( $datepicker[ $field->dateFormat ] ) ) { |
|
| 626 | 626 | $format = $datepicker[ $field->dateFormat ]; |
| 627 | 627 | } |
| 628 | 628 | |