Completed
Pull Request — master (#716)
by Zack
09:51 queued 04:52
created
includes/class-gravityview-extension.php 1 patch
Braces   +3 added lines, -5 removed lines patch added patch discarded remove patch
@@ -183,12 +183,10 @@  discard block
 block discarded – undo
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
 block discarded – undo
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
 
Please login to merge, or discard this patch.
includes/class-gravityview-settings.php 1 patch
Braces   +3 added lines, -2 removed lines patch added patch discarded remove patch
@@ -441,8 +441,9 @@
 block discarded – undo
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
 
Please login to merge, or discard this patch.
includes/extensions/edit-entry/class-edit-entry-render.php 1 patch
Braces   +2 added lines, -4 removed lines patch added patch discarded remove patch
@@ -613,7 +613,7 @@  discard block
 block discarded – undo
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
 block discarded – undo
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
 
Please login to merge, or discard this patch.
includes/admin/class-gravityview-admin-no-conflict.php 1 patch
Braces   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -116,7 +116,7 @@  discard block
 block discarded – undo
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
 block discarded – undo
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
 		}
Please login to merge, or discard this patch.
includes/class-common.php 1 patch
Braces   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -255,7 +255,7 @@  discard block
 block discarded – undo
255 255
 				}
256 256
 
257 257
 
258
-				if( GFCommon::is_product_field( $field->type ) ){
258
+				if( GFCommon::is_product_field( $field->type ) ) {
259 259
 					$has_product_fields = true;
260 260
 				}
261 261
 
@@ -315,7 +315,7 @@  discard block
 block discarded – undo
315 315
 
316 316
 		$fields = array();
317 317
 
318
-		foreach ( $extra_fields as $key => $field ){
318
+		foreach ( $extra_fields as $key => $field ) {
319 319
 			if ( ! empty( $only_default_column ) && ! empty( $field['is_default_column'] ) ) {
320 320
 				$fields[ $key ] = array( 'label' => $field['label'], 'type' => 'entry_meta' );
321 321
 			}
@@ -881,7 +881,7 @@  discard block
 block discarded – undo
881 881
 	 * @return GF_Field|null Gravity Forms field object, or NULL: Gravity Forms GFFormsModel does not exist or field at $field_id doesn't exist.
882 882
 	 */
883 883
 	public static function get_field( $form, $field_id ) {
884
-		if ( class_exists( 'GFFormsModel' ) ){
884
+		if ( class_exists( 'GFFormsModel' ) ) {
885 885
 			return GFFormsModel::get_field( $form, $field_id );
886 886
 		} else {
887 887
 			return null;
@@ -928,7 +928,7 @@  discard block
 block discarded – undo
928 928
 			$shortcodes = array();
929 929
 
930 930
 			preg_match_all( '/' . get_shortcode_regex() . '/s', $content, $matches, PREG_SET_ORDER );
931
-			if ( empty( $matches ) ){
931
+			if ( empty( $matches ) ) {
932 932
 				return false;
933 933
 			}
934 934
 
@@ -1408,7 +1408,7 @@  discard block
 block discarded – undo
1408 1408
 	public static function array_merge_recursive_distinct( array &$array1, array &$array2 ) {
1409 1409
 		$merged = $array1;
1410 1410
 
1411
-		foreach ( $array2 as $key => &$value )  {
1411
+		foreach ( $array2 as $key => &$value ) {
1412 1412
 			if ( is_array( $value ) && isset( $merged[ $key ] ) && is_array( $merged[ $key ] ) ) {
1413 1413
 				$merged[ $key ] = self::array_merge_recursive_distinct( $merged[ $key ], $value );
1414 1414
 			} else {
Please login to merge, or discard this patch.
includes/fields/class-gravityview-field-password.php 1 patch
Braces   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -49,7 +49,7 @@
 block discarded – undo
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'] ) ) {
Please login to merge, or discard this patch.