Code Duplication    Length = 7-9 lines in 2 locations

wp-admin/includes/class-wp-press-this.php 2 locations

@@ 1086-1094 (lines=9) @@
1083
1084
		if ( ! empty( $data['t'] ) ) {
1085
			$title = $data['t'];
1086
		} elseif ( ! empty( $data['_meta'] ) ) {
1087
			if ( ! empty( $data['_meta']['twitter:title'] ) ) {
1088
				$title = $data['_meta']['twitter:title'];
1089
			} else if ( ! empty( $data['_meta']['og:title'] ) ) {
1090
				$title = $data['_meta']['og:title'];
1091
			} else if ( ! empty( $data['_meta']['title'] ) ) {
1092
				$title = $data['_meta']['title'];
1093
			}
1094
		}
1095
1096
		return $title;
1097
	}
@@ 1116-1122 (lines=7) @@
1113
		if ( ! empty( $data['s'] ) ) {
1114
			$text = $data['s'];
1115
		} else if ( ! empty( $data['_meta'] ) ) {
1116
			if ( ! empty( $data['_meta']['twitter:description'] ) ) {
1117
				$text = $data['_meta']['twitter:description'];
1118
			} else if ( ! empty( $data['_meta']['og:description'] ) ) {
1119
				$text = $data['_meta']['og:description'];
1120
			} else if ( ! empty( $data['_meta']['description'] ) ) {
1121
				$text = $data['_meta']['description'];
1122
			}
1123
1124
			// If there is an ellipsis at the end, the description is very likely auto-generated. Better to ignore it.
1125
			if ( $text && substr( $text, -3 ) === '...' ) {