Code Duplication    Length = 7-7 lines in 2 locations

modules/shortcodes/gist.php 1 location

@@ 126-132 (lines=7) @@
123
 */
124
function github_gist_shortcode( $atts, $content = '' ) {
125
126
	if ( empty( $atts[0] ) && empty( $content ) ) {
127
		if ( current_user_can( 'edit_posts' ) ) {
128
			return esc_html__( 'Please specify a Gist URL or ID.', 'jetpack' );
129
		} else {
130
			return '<!-- Missing Gist ID -->';
131
		}
132
	}
133
134
	$id = ( ! empty( $content ) ) ? $content : $atts[0];
135

modules/shortcodes/soundcloud.php 1 location

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