Code Duplication    Length = 6-6 lines in 2 locations

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

@@ 89-94 (lines=6) @@
86
			return new WP_Error( 'invalid_context', 'Invalid API CONTEXT', 400 );
87
		}
88
89
		if ( 'display' === $context ) {
90
			$args = $this->query_args();
91
			if ( isset( $args['content_width'] ) && $args['content_width'] ) {
92
				$GLOBALS['content_width'] = (int) $args['content_width'];
93
			}
94
		}
95
96
		if ( strpos( $_SERVER['HTTP_USER_AGENT'], 'wp-windows8' ) ) {
97
			remove_shortcode( 'gallery', 'gallery_shortcode' );

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

@@ 92-97 (lines=6) @@
89
			$geo = false;
90
		}
91
92
		if ( 'display' === $context ) {
93
			$args = $this->query_args();
94
			if ( isset( $args['content_width'] ) && $args['content_width'] ) {
95
				$GLOBALS['content_width'] = (int) $args['content_width'];
96
			}
97
		}
98
99
		if ( strpos( $_SERVER['HTTP_USER_AGENT'], 'wp-windows8' ) ) {
100
			remove_shortcode( 'gallery', 'gallery_shortcode' );