Code Duplication    Length = 4-4 lines in 2 locations

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

@@ 96-99 (lines=4) @@
93
			}
94
		}
95
96
		if ( strpos( $_SERVER['HTTP_USER_AGENT'], 'wp-windows8' ) ) {
97
			remove_shortcode( 'gallery', 'gallery_shortcode' );
98
			add_shortcode( 'gallery', array( &$this, 'win8_gallery_shortcode' ) );
99
		}
100
101
		// fetch SAL post
102
		$post = $this->get_sal_post_by( $field, $field_value, $context );

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

@@ 99-102 (lines=4) @@
96
			}
97
		}
98
99
		if ( strpos( $_SERVER['HTTP_USER_AGENT'], 'wp-windows8' ) ) {
100
			remove_shortcode( 'gallery', 'gallery_shortcode' );
101
			add_shortcode( 'gallery', array( &$this, 'win8_gallery_shortcode' ) );
102
		}
103
104
		switch ( $field ) {
105
		case 'name' :