Completed
Pull Request — master (#869)
by Zack
06:18
created
future/_mocks.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -59,7 +59,7 @@  discard block
 block discarded – undo
59 59
 
60 60
 /** Add some global fix for field capability discrepancies. */
61 61
 add_filter( 'gravityview/configuration/fields', function( $fields ) {
62
-	if ( empty( $fields  ) ) {
62
+	if ( empty( $fields ) ) {
63 63
 		return $fields;
64 64
 	}
65 65
 
@@ -86,11 +86,11 @@  discard block
 block discarded – undo
86 86
 		}
87 87
 
88 88
 		foreach ( $_fields as $uid => &$_field ) {
89
-			if ( ! isset( $_field['only_loggedin'] ) ) {
89
+			if ( ! isset( $_field[ 'only_loggedin' ] ) ) {
90 90
 				continue;
91 91
 			}
92 92
 			/** If we do not require login, we don't require a cap. */
93
-			$_field['only_loggedin'] != '1' && ( $_field['only_loggedin_cap'] = '' );
93
+			$_field[ 'only_loggedin' ] != '1' && ( $_field[ 'only_loggedin_cap' ] = '' );
94 94
 		}
95 95
 	}
96 96
 	return $fields;
Please login to merge, or discard this patch.
includes/plugin-and-theme-hooks/class-gravityview-plugin-hooks-acf.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -48,7 +48,7 @@  discard block
 block discarded – undo
48 48
 			return $meta_keys;
49 49
 		}
50 50
 
51
-		if( $acf_keys = get_field_objects( $post_id, array( 'load_value' => false ) ) ) {
51
+		if ( $acf_keys = get_field_objects( $post_id, array( 'load_value' => false ) ) ) {
52 52
 			return array_merge( array_keys( $acf_keys ), $meta_keys );
53 53
 		}
54 54
 
@@ -63,9 +63,9 @@  discard block
 block discarded – undo
63 63
 	 * @return void
64 64
 	 */
65 65
 	private function fix_posted_fields() {
66
-		if( is_admin() && isset( $_POST['action'] ) && isset( $_POST['post_type'] ) ) {
67
-			if( 'editpost' === $_POST['action'] && 'gravityview' === $_POST['post_type'] ) {
68
-				$_POST['fields'] = _gravityview_process_posted_fields();
66
+		if ( is_admin() && isset( $_POST[ 'action' ] ) && isset( $_POST[ 'post_type' ] ) ) {
67
+			if ( 'editpost' === $_POST[ 'action' ] && 'gravityview' === $_POST[ 'post_type' ] ) {
68
+				$_POST[ 'fields' ] = _gravityview_process_posted_fields();
69 69
 			}
70 70
 		}
71 71
 	}
Please login to merge, or discard this patch.