Code Duplication    Length = 7-7 lines in 2 locations

classes/fields/website.php 2 locations

@@ 210-216 (lines=7) @@
207
		$options = (array) $options;
208
209
		// Update from a array input field (like link) if the field updates
210
		if ( is_array( $value ) ) {
211
			if ( isset( $value['url'] ) ) {
212
				$value = $value['url'];
213
			} else {
214
				$value = implode( ' ', $value );
215
			}
216
		}
217
218
		$value = $this->validate_url( $value, $options );
219
@@ 257-263 (lines=7) @@
254
			return $this->strip_html( $value, $options );
255
		}
256
257
		if ( is_array( $value ) ) {
258
			if ( isset( $value['scheme'] ) ) {
259
				$value = $this->build_url( $value, $options );
260
			} else {
261
				$value = @implode( '', $value );
262
			}
263
		}
264
265
		if ( false === strpos( $value, '://' ) && 0 !== strpos( $value, '//' ) ) {
266
			$value = 'http://' . $value;