Code Duplication    Length = 8-9 lines in 2 locations

modules/custom-css/custom-css-4.7.php 1 location

@@ 946-954 (lines=9) @@
943
	 *
944
	 * @return array
945
	 */
946
	static function editor_max_image_size( $dims, $size = 'medium', $context = null ) {
947
		list( $width, $height ) = $dims;
948
949
		if ( 'large' === $size && 'edit' === $context ) {
950
			$width = Jetpack::get_content_width();
951
		}
952
953
		return array( $width, $height );
954
	}
955
956
	/**
957
	 * Override the content_width with a custom value if one is set.

modules/custom-css/custom-css.php 1 location

@@ 1554-1561 (lines=8) @@
1551
	 * When on the edit screen, make sure the custom content width
1552
	 * setting is applied to the large image size.
1553
	 */
1554
	static function editor_max_image_size( $dims, $size = 'medium', $context = null ) {
1555
		list( $width, $height ) = $dims;
1556
1557
		if ( 'large' == $size && 'edit' == $context )
1558
			$width = Jetpack::get_content_width();
1559
1560
		return array( $width, $height );
1561
	}
1562
1563
	/**
1564
	 * Override the content_width with a custom value if one is set.