Code Duplication    Length = 13-13 lines in 3 locations

includes/acf/api/api-value.php 3 locations

@@ 69-81 (lines=13) @@
66
		 	
67
	 	}
68
	 	
69
	} else {
70
		
71
		// modify prefix for hidden meta
72
		if( $hidden ) {
73
			
74
			$post_id = '_' . $post_id;
75
			$name = substr($name, 1);
76
			
77
		}
78
		
79
		$value = get_option( $post_id . '_' . $name, null );
80
		
81
	}
82
		
83
	
84
	// return
@@ 140-152 (lines=13) @@
137
		$return = update_metadata('comment', $comment_id, $name, $value);
138
	
139
	// options	
140
	} else {
141
		
142
		// modify prefix for hidden meta
143
		if( $hidden ) {
144
			
145
			$post_id = '_' . $post_id;
146
			$name = substr($name, 1);
147
			
148
		}
149
		
150
		$return = acf_update_option( $post_id . '_' . $name, $value );
151
		
152
	}
153
	
154
	
155
	// return
@@ 210-222 (lines=13) @@
207
		$return = delete_metadata('comment', $comment_id, $name);
208
	
209
	// options	
210
	} else {
211
		
212
		// modify prefix for hidden meta
213
		if( $hidden ) {
214
			
215
			$post_id = '_' . $post_id;
216
			$name = substr($name, 1);
217
			
218
		}
219
		
220
		$return = delete_option( $post_id . '_' . $name );
221
		
222
	}
223
	
224
	
225
	// return