@@ -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 |
@@ -116,7 +116,7 @@ discard block |
||
116 | 116 | |
117 | 117 | // Dequeue other jQuery styles even if no-conflict is off. |
118 | 118 | // Terrible-looking tabs help no one. |
119 | - if( !empty( $wp_styles->registered ) ) { |
|
119 | + if( !empty( $wp_styles->registered ) ) { |
|
120 | 120 | foreach ($wp_styles->registered as $key => $style) { |
121 | 121 | if( preg_match( '/^(?:wp\-)?jquery/ism', $key ) ) { |
122 | 122 | wp_dequeue_style( $key ); |
@@ -189,8 +189,8 @@ discard block |
||
189 | 189 | |
190 | 190 | //unregistering scripts |
191 | 191 | $registered = array(); |
192 | - foreach( $wp_objects->registered as $handle => $script_registration ){ |
|
193 | - if( in_array( $handle, $required_objects ) ){ |
|
192 | + foreach( $wp_objects->registered as $handle => $script_registration ) { |
|
193 | + if( in_array( $handle, $required_objects ) ) { |
|
194 | 194 | $registered[ $handle ] = $script_registration; |
195 | 195 | } |
196 | 196 | } |
@@ -49,7 +49,7 @@ |
||
49 | 49 | * |
50 | 50 | * @return string If a custom field label isn't set, return the field label for the password field |
51 | 51 | */ |
52 | - function field_label( $label = '', $field = array(), $form = array(), $entry = array() ){ |
|
52 | + function field_label( $label = '', $field = array(), $form = array(), $entry = array() ) { |
|
53 | 53 | |
54 | 54 | // If using a custom label, no need to fetch the parent label |
55 | 55 | if( ! is_numeric( $field['id'] ) || ! empty( $field['custom_label'] ) ) { |
@@ -262,7 +262,7 @@ discard block |
||
262 | 262 | } |
263 | 263 | |
264 | 264 | |
265 | - if( GFCommon::is_product_field( $field['type'] ) ){ |
|
265 | + if( GFCommon::is_product_field( $field['type'] ) ) { |
|
266 | 266 | $has_product_fields = true; |
267 | 267 | } |
268 | 268 | |
@@ -322,7 +322,7 @@ discard block |
||
322 | 322 | |
323 | 323 | $fields = array(); |
324 | 324 | |
325 | - foreach ( $extra_fields as $key => $field ){ |
|
325 | + foreach ( $extra_fields as $key => $field ) { |
|
326 | 326 | if ( ! empty( $only_default_column ) && ! empty( $field['is_default_column'] ) ) { |
327 | 327 | $fields[ $key ] = array( 'label' => $field['label'], 'type' => 'entry_meta' ); |
328 | 328 | } |
@@ -888,7 +888,7 @@ discard block |
||
888 | 888 | * @return GF_Field|null Gravity Forms field object, or NULL: Gravity Forms GFFormsModel does not exist or field at $field_id doesn't exist. |
889 | 889 | */ |
890 | 890 | public static function get_field( $form, $field_id ) { |
891 | - if ( class_exists( 'GFFormsModel' ) ){ |
|
891 | + if ( class_exists( 'GFFormsModel' ) ) { |
|
892 | 892 | return GFFormsModel::get_field( $form, $field_id ); |
893 | 893 | } else { |
894 | 894 | return null; |
@@ -935,7 +935,7 @@ discard block |
||
935 | 935 | $shortcodes = array(); |
936 | 936 | |
937 | 937 | preg_match_all( '/' . get_shortcode_regex() . '/s', $content, $matches, PREG_SET_ORDER ); |
938 | - if ( empty( $matches ) ){ |
|
938 | + if ( empty( $matches ) ) { |
|
939 | 939 | return false; |
940 | 940 | } |
941 | 941 |
@@ -2,8 +2,9 @@ discard block |
||
2 | 2 | namespace GV; |
3 | 3 | |
4 | 4 | /** If this file is called directly, abort. */ |
5 | -if ( ! defined( 'GRAVITYVIEW_DIR' ) ) |
|
5 | +if ( ! defined( 'GRAVITYVIEW_DIR' ) ) { |
|
6 | 6 | die(); |
7 | +} |
|
7 | 8 | |
8 | 9 | /** |
9 | 10 | * The core GravityView API. |
@@ -45,8 +46,9 @@ discard block |
||
45 | 46 | * @return \GV\Core The global instance of GravityView Core. |
46 | 47 | */ |
47 | 48 | public static function get() { |
48 | - if ( ! self::$__instance instanceof self ) |
|
49 | - self::$__instance = new self; |
|
49 | + if ( ! self::$__instance instanceof self ) { |
|
50 | + self::$__instance = new self; |
|
51 | + } |
|
50 | 52 | return self::$__instance; |
51 | 53 | } |
52 | 54 |
@@ -1,11 +1,13 @@ |
||
1 | 1 | <?php |
2 | 2 | /** If this file is called directly, abort. */ |
3 | -if ( ! defined( 'GRAVITYVIEW_DIR' ) ) |
|
3 | +if ( ! defined( 'GRAVITYVIEW_DIR' ) ) { |
|
4 | 4 | die(); |
5 | +} |
|
5 | 6 | |
6 | 7 | /** The future branch of GravityView requires PHP 5.3+ namespaces and SPL. */ |
7 | -if ( version_compare( phpversion(), '5.3' , '<' ) ) |
|
8 | +if ( version_compare( phpversion(), '5.3' , '<' ) ) { |
|
8 | 9 | return false; |
10 | +} |
|
9 | 11 | |
10 | 12 | /** Require */ |
11 | 13 | require GRAVITYVIEW_DIR . 'future/includes/class-gv-core.php'; |
@@ -2,8 +2,9 @@ discard block |
||
2 | 2 | namespace GV; |
3 | 3 | |
4 | 4 | /** If this file is called directly, abort. */ |
5 | -if ( ! defined( 'GRAVITYVIEW_DIR' ) ) |
|
5 | +if ( ! defined( 'GRAVITYVIEW_DIR' ) ) { |
|
6 | 6 | die(); |
7 | +} |
|
7 | 8 | |
8 | 9 | /** |
9 | 10 | * The GravityView WordPress plugin class. |
@@ -68,8 +69,9 @@ discard block |
||
68 | 69 | * @return \GV\Plugin The global instance of GravityView Plugin. |
69 | 70 | */ |
70 | 71 | public static function get() { |
71 | - if ( ! self::$__instance instanceof self ) |
|
72 | - self::$__instance = new self; |
|
72 | + if ( ! self::$__instance instanceof self ) { |
|
73 | + self::$__instance = new self; |
|
74 | + } |
|
73 | 75 | return self::$__instance; |
74 | 76 | } |
75 | 77 | |
@@ -225,8 +227,9 @@ discard block |
||
225 | 227 | * @return string The version of Gravity Forms. |
226 | 228 | */ |
227 | 229 | private function get_gravityforms_version() { |
228 | - if ( !class_exists( '\GFCommon' ) || !empty( $GLOBALS['GRAVITYVIEW_TESTS_GF_INACTIVE_OVERRIDE'] ) ) |
|
229 | - throw new \ErrorException( __( 'Gravity Forms is inactive or not installed.', 'gravityview' ) ); |
|
230 | + if ( !class_exists( '\GFCommon' ) || !empty( $GLOBALS['GRAVITYVIEW_TESTS_GF_INACTIVE_OVERRIDE'] ) ) { |
|
231 | + throw new \ErrorException( __( 'Gravity Forms is inactive or not installed.', 'gravityview' ) ); |
|
232 | + } |
|
230 | 233 | |
231 | 234 | return !empty( $GLOBALS['GRAVITYVIEW_TESTS_GF_VERSION_OVERRIDE'] ) ? |
232 | 235 | $GLOBALS['GRAVITYVIEW_TESTS_GF_VERSION_OVERRIDE'] : \GFCommon::$version; |