Code Duplication    Length = 7-7 lines in 2 locations

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

@@ 136-142 (lines=7) @@
133
		return $return;
134
	}
135
136
	function build_page_handle( $post, $query ) {
137
		$column = $query['orderby'];
138
		if ( ! $column ) {
139
			$column = 'date';
140
		}
141
		return build_query( array( 'value' => urlencode( $post->$column ), 'id' => $post->ID ) );
142
	}
143
144
	function handle_where_for_page_handle( $where ) {
145
		global $wpdb;

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

@@ 348-354 (lines=7) @@
345
		return $return;
346
	}
347
348
	function build_page_handle( $post, $query ) {
349
		$column = $query['orderby'];
350
		if ( ! $column ) {
351
			$column = 'date';
352
		}
353
		return build_query( array( 'value' => urlencode($post[$column]), 'id' => $post['ID'] ) );
354
	}
355
356
	function _build_date_range_query( $column, $range, $where ) {
357
		global $wpdb;