@@ -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 | |
@@ -183,12 +183,10 @@ discard block |
||
| 183 | 183 | if ( file_exists( $mofile_global ) ) { |
| 184 | 184 | // Look in global /wp-content/languages/[plugin-dir]/ folder |
| 185 | 185 | load_textdomain( $this->_text_domain, $mofile_global ); |
| 186 | - } |
|
| 187 | - elseif ( file_exists( $mofile_local ) ) { |
|
| 186 | + } elseif ( file_exists( $mofile_local ) ) { |
|
| 188 | 187 | // Look in local /wp-content/plugins/[plugin-dir]/languages/ folder |
| 189 | 188 | load_textdomain( $this->_text_domain, $mofile_local ); |
| 190 | - } |
|
| 191 | - else { |
|
| 189 | + } else { |
|
| 192 | 190 | // Load the default language files |
| 193 | 191 | load_plugin_textdomain( $this->_text_domain, false, $lang_dir ); |
| 194 | 192 | } |
@@ -219,7 +217,7 @@ discard block |
||
| 219 | 217 | public function settings() { |
| 220 | 218 | |
| 221 | 219 | // If doing ajax, get outta here |
| 222 | - if( ! is_admin() || ( defined( 'DOING_AJAX' ) && DOING_AJAX ) ) { |
|
| 220 | + if( ! is_admin() || ( defined( 'DOING_AJAX' ) && DOING_AJAX ) ) { |
|
| 223 | 221 | return; |
| 224 | 222 | } |
| 225 | 223 | |
@@ -290,7 +290,7 @@ discard block |
||
| 290 | 290 | $has_poll_fields = true; |
| 291 | 291 | } |
| 292 | 292 | |
| 293 | - if( GFCommon::is_product_field( $field['type'] ) ){ |
|
| 293 | + if( GFCommon::is_product_field( $field['type'] ) ) { |
|
| 294 | 294 | $has_product_fields = true; |
| 295 | 295 | } |
| 296 | 296 | |
@@ -373,7 +373,7 @@ discard block |
||
| 373 | 373 | |
| 374 | 374 | $fields = array(); |
| 375 | 375 | |
| 376 | - foreach ( $extra_fields as $key => $field ){ |
|
| 376 | + foreach ( $extra_fields as $key => $field ) { |
|
| 377 | 377 | if ( ! empty( $only_default_column ) && ! empty( $field['is_default_column'] ) ) { |
| 378 | 378 | $fields[ $key ] = array( 'label' => $field['label'], 'type' => 'entry_meta' ); |
| 379 | 379 | } |
@@ -913,7 +913,7 @@ discard block |
||
| 913 | 913 | * @return array|null Array: Gravity Forms field array; NULL: Gravity Forms GFFormsModel does not exist |
| 914 | 914 | */ |
| 915 | 915 | public static function get_field( $form, $field_id ) { |
| 916 | - if ( class_exists( 'GFFormsModel' ) ){ |
|
| 916 | + if ( class_exists( 'GFFormsModel' ) ) { |
|
| 917 | 917 | return GFFormsModel::get_field( $form, $field_id ); |
| 918 | 918 | } else { |
| 919 | 919 | return null; |
@@ -960,7 +960,7 @@ discard block |
||
| 960 | 960 | $shortcodes = array(); |
| 961 | 961 | |
| 962 | 962 | preg_match_all( '/' . get_shortcode_regex() . '/s', $content, $matches, PREG_SET_ORDER ); |
| 963 | - if ( empty( $matches ) ){ |
|
| 963 | + if ( empty( $matches ) ) { |
|
| 964 | 964 | return false; |
| 965 | 965 | } |
| 966 | 966 | |
@@ -1423,7 +1423,7 @@ discard block |
||
| 1423 | 1423 | public static function array_merge_recursive_distinct( array &$array1, array &$array2 ) { |
| 1424 | 1424 | $merged = $array1; |
| 1425 | 1425 | |
| 1426 | - foreach ( $array2 as $key => &$value ) { |
|
| 1426 | + foreach ( $array2 as $key => &$value ) { |
|
| 1427 | 1427 | if ( is_array( $value ) && isset( $merged[ $key ] ) && is_array( $merged[ $key ] ) ) { |
| 1428 | 1428 | $merged[ $key ] = self::array_merge_recursive_distinct( $merged[ $key ], $value ); |
| 1429 | 1429 | } else { |
@@ -441,8 +441,9 @@ |
||
| 441 | 441 | $field['name'] = 'gform-settings-save'; |
| 442 | 442 | $field['class'] = isset( $field['class'] ) ? $field['class'] : 'button-primary gfbutton'; |
| 443 | 443 | |
| 444 | - if ( ! rgar( $field, 'value' ) ) |
|
| 445 | - $field['value'] = __( 'Update Settings', 'gravityview' ); |
|
| 444 | + if ( ! rgar( $field, 'value' ) ) { |
|
| 445 | + $field['value'] = __( 'Update Settings', 'gravityview' ); |
|
| 446 | + } |
|
| 446 | 447 | |
| 447 | 448 | $output = $this->settings_submit( $field, false ); |
| 448 | 449 | |
@@ -613,7 +613,7 @@ discard block |
||
| 613 | 613 | |
| 614 | 614 | $back_link = esc_url( remove_query_arg( array( 'page', 'view', 'edit' ) ) ); |
| 615 | 615 | |
| 616 | - if( ! $this->is_valid ){ |
|
| 616 | + if( ! $this->is_valid ) { |
|
| 617 | 617 | |
| 618 | 618 | // Keeping this compatible with Gravity Forms. |
| 619 | 619 | $validation_message = "<div class='validation_error'>" . __('There was a problem with your submission.', 'gravityview') . " " . __('Errors have been highlighted below.', 'gravityview') . "</div>"; |
@@ -1620,9 +1620,7 @@ discard block |
||
| 1620 | 1620 | // Verify |
| 1621 | 1621 | else if( ! $this->is_edit_entry() ) { |
| 1622 | 1622 | $valid = false; |
| 1623 | - } |
|
| 1624 | - |
|
| 1625 | - else { |
|
| 1623 | + } else { |
|
| 1626 | 1624 | $valid = wp_verify_nonce( $_GET['edit'], self::$nonce_key ); |
| 1627 | 1625 | } |
| 1628 | 1626 | |