Code Duplication    Length = 27-27 lines in 5 locations

includes/acf/fields/page_link.php 1 location

@@ 279-305 (lines=27) @@
276
	*  @return	$post_id (int)
277
	*/
278
	
279
	function ajax_query() {
280
		
281
		// validate
282
		if( !acf_verify_ajax() ) {
283
		
284
			die();
285
			
286
		}
287
		
288
		
289
		// get choices
290
		$choices = $this->get_choices( $_POST );
291
		
292
		
293
		// validate
294
		if( !$choices ) {
295
			
296
			die();
297
			
298
		}
299
		
300
		
301
		// return JSON
302
		echo json_encode( $choices );
303
		die();
304
			
305
	}
306
	
307
	
308
	/*

includes/acf/fields/post_object.php 1 location

@@ 235-261 (lines=27) @@
232
	*  @return	$post_id (int)
233
	*/
234
	
235
	function ajax_query() {
236
		
237
		// validate
238
		if( !acf_verify_ajax() ) {
239
		
240
			die();
241
			
242
		}
243
		
244
		
245
		// get choices
246
		$choices = $this->get_choices( $_POST );
247
		
248
		
249
		// validate
250
		if( !$choices ) {
251
			
252
			die();
253
			
254
		}
255
		
256
		
257
		// return JSON
258
		echo json_encode( $choices );
259
		die();
260
			
261
	}
262
	
263
	
264
	/*

includes/acf/fields/relationship.php 1 location

@@ 264-290 (lines=27) @@
261
	*  @return	$post_id (int)
262
	*/
263
	
264
	function ajax_query() {
265
		
266
		// validate
267
		if( !acf_verify_ajax() ) {
268
		
269
			die();
270
			
271
		}
272
		
273
		
274
		// get posts
275
		$posts = $this->get_choices( $_POST );
276
		
277
		
278
		// validate
279
		if( !$posts ) {
280
			
281
			die();
282
			
283
		}
284
		
285
		
286
		// return JSON
287
		echo json_encode( $posts );
288
		die();
289
			
290
	}
291
	
292
	
293
	/*

includes/acf/fields/taxonomy.php 1 location

@@ 195-221 (lines=27) @@
192
	*  @return	$post_id (int)
193
	*/
194
	
195
	function ajax_query() {
196
		
197
		// validate
198
		if( !acf_verify_ajax() ) {
199
		
200
			die();
201
			
202
		}
203
		
204
		
205
		// get choices
206
		$choices = $this->get_choices( $_POST );
207
		
208
		
209
		// validate
210
		if( !$choices ) {
211
			
212
			die();
213
			
214
		}
215
		
216
		
217
		// return JSON
218
		echo json_encode( $choices );
219
		die();
220
			
221
	}
222
	
223
	
224
	/*

includes/acf/fields/user.php 1 location

@@ 230-256 (lines=27) @@
227
	*  @return	$post_id (int)
228
	*/
229
	
230
	function ajax_query() {
231
		
232
		// validate
233
		if( !acf_verify_ajax() ) {
234
		
235
			die();
236
			
237
		}
238
		
239
		
240
		// get choices
241
		$choices = $this->get_choices( $_POST );
242
		
243
		
244
		// validate
245
		if( !$choices ) {
246
			
247
			die();
248
			
249
		}
250
		
251
		
252
		// return JSON
253
		echo json_encode( $choices );
254
		die();
255
			
256
	}
257
	
258
	
259
	/*