Code Duplication    Length = 5-5 lines in 2 locations

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

@@ 115-119 (lines=5) @@
112
		/** This filter is documented in class.json-api-endpoints.php */
113
		$is_jetpack = true === apply_filters( 'is_jetpack_site', false, $blog_id );
114
115
		if ( defined( 'GEO_LOCATION__CLASS' ) && class_exists( GEO_LOCATION__CLASS ) ) {
116
			$geo = call_user_func( array( GEO_LOCATION__CLASS, 'init' ) );
117
		} else {
118
			$geo = false;
119
		}
120
121
		if ( 'display' === $context ) {
122
			$args = $this->query_args();

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

@@ 107-111 (lines=5) @@
104
		/** This filter is documented in class.json-api-endpoints.php */
105
		$is_jetpack = true === apply_filters( 'is_jetpack_site', false, $blog_id );
106
107
		if ( defined( 'GEO_LOCATION__CLASS' ) && class_exists( GEO_LOCATION__CLASS ) ) {
108
			$geo = call_user_func( array( GEO_LOCATION__CLASS, 'init' ) );
109
		} else {
110
			$geo = false;
111
		}
112
113
		if ( 'display' === $context ) {
114
			$args = $this->query_args();