Code Duplication    Length = 3-3 lines in 3 locations

json-endpoints/class.wpcom-json-api-list-posts-endpoint.php 1 location

@@ 282-284 (lines=3) @@
279
		 * use it there.
280
		 */
281
		$column_whitelist = array( 'post_modified_gmt' );
282
		if ( isset( $args['column'] ) && in_array( $args['column'], $column_whitelist ) ) {
283
			$query['column'] = $args['column'];
284
		}
285
286
		$wp_query = new WP_Query( $query );
287
		if ( $this->date_range ) {

json-endpoints/class.wpcom-json-api-list-posts-v1-1-endpoint.php 1 location

@@ 333-335 (lines=3) @@
330
		 * use it there.
331
		 */
332
		$column_whitelist = array( 'post_modified_gmt' );
333
		if ( isset( $args['column'] ) && in_array( $args['column'], $column_whitelist ) ) {
334
			$query['column'] = $args['column'];
335
		}
336
337
		$this->performed_query = $query;
338
		add_filter( 'posts_orderby', array( $this, 'handle_orderby_for_page_handle' ) );

json-endpoints/class.wpcom-json-api-list-posts-v1-2-endpoint.php 1 location

@@ 327-329 (lines=3) @@
324
		 * use it there.
325
		 */
326
		$column_whitelist = array( 'post_modified_gmt' );
327
		if ( isset( $args['column'] ) && in_array( $args['column'], $column_whitelist ) ) {
328
			$query['column'] = $args['column'];
329
		}
330
331
		$this->performed_query = $query;
332
		add_filter( 'posts_orderby', array( $this, 'handle_orderby_for_page_handle' ) );