Completed
Push — develop ( 127121...9fabe4 )
by Zack
11:50
created
includes/plugin-and-theme-hooks/class-gravityview-plugin-hooks-acf.php 1 patch
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -44,20 +44,20 @@  discard block
 block discarded – undo
44 44
 	function add_meta_keys_from_post( $meta_keys = array(), $post_id = 0 ) {
45 45
 
46 46
 		// Can never be too careful: double-check that ACF is active and the function exists
47
-		if ( ! function_exists( 'get_field_objects' ) || ! class_exists('acf_field_functions' ) ) {
47
+		if ( ! function_exists( 'get_field_objects' ) || ! class_exists( 'acf_field_functions' ) ) {
48 48
 			return $meta_keys;
49 49
 		}
50 50
 
51 51
 		$acf_field_functions = new acf_field_functions;
52 52
 
53
-		remove_action('acf/format_value', array( $acf_field_functions, 'format_value'), 5 );
53
+		remove_action( 'acf/format_value', array( $acf_field_functions, 'format_value' ), 5 );
54 54
 
55 55
 		$acf_keys = get_field_objects( $post_id, array( 'load_value' => false ) );
56 56
 
57 57
 		// Restore existing filters added by format_value
58
-		add_action('acf/format_value', array( $acf_field_functions, 'format_value'), 5, 3 );
58
+		add_action( 'acf/format_value', array( $acf_field_functions, 'format_value' ), 5, 3 );
59 59
 
60
-		if( $acf_keys ) {
60
+		if ( $acf_keys ) {
61 61
 			return array_merge( array_keys( $acf_keys ), $meta_keys );
62 62
 		}
63 63
 
@@ -72,9 +72,9 @@  discard block
 block discarded – undo
72 72
 	 * @return void
73 73
 	 */
74 74
 	private function fix_posted_fields() {
75
-		if( is_admin() && isset( $_POST['action'] ) && isset( $_POST['post_type'] ) ) {
76
-			if( 'editpost' === $_POST['action'] && 'gravityview' === $_POST['post_type'] ) {
77
-				$_POST['fields'] = _gravityview_process_posted_fields();
75
+		if ( is_admin() && isset( $_POST[ 'action' ] ) && isset( $_POST[ 'post_type' ] ) ) {
76
+			if ( 'editpost' === $_POST[ 'action' ] && 'gravityview' === $_POST[ 'post_type' ] ) {
77
+				$_POST[ 'fields' ] = _gravityview_process_posted_fields();
78 78
 			}
79 79
 		}
80 80
 	}
Please login to merge, or discard this patch.