Code Duplication    Length = 7-7 lines in 2 locations

modules/shortcodes/gist.php 1 location

@@ 113-119 (lines=7) @@
110
 */
111
function github_gist_shortcode( $atts, $content = '' ) {
112
113
	if ( empty( $atts[0] ) && empty( $content ) ) {
114
		if ( current_user_can( 'edit_posts' ) ) {
115
			return esc_html__( 'Please specify a Gist URL or ID.', 'jetpack' );
116
		} else {
117
			return '<!-- Missing Gist ID -->';
118
		}
119
	}
120
121
	$id = ( ! empty( $content ) ) ? $content : $atts[0];
122

modules/shortcodes/soundcloud.php 1 location

@@ 40-46 (lines=7) @@
37
	);
38
39
	// The "url" option is required.
40
	if ( empty( $shortcode_options['url'] ) ) {
41
		if ( current_user_can( 'edit_posts' ) ) {
42
			return esc_html__( 'Please specify a Soundcloud URL.', 'jetpack' );
43
		} else {
44
			return '<!-- Missing Soundcloud URL -->';
45
		}
46
	}
47
48
	// Turn shortcode option "param" (param=value&param2=value) into array of params.
49
	$shortcode_params = array();