Code Duplication    Length = 5-6 lines in 2 locations

modules/widgets/top-posts.php 1 location

@@ 303-308 (lines=6) @@
300
			echo $args['before_title'] . $title . $args['after_title'];
301
302
		if ( ! $posts ) {
303
			if ( current_user_can( 'edit_theme_options' ) ) {
304
				echo '<p>' . sprintf(
305
					__( 'There are no posts to display. <a href="%s" target="_blank">Want more traffic?</a>', 'jetpack' ),
306
					'https://jetpack.com/support/getting-more-views-and-traffic/'
307
				) . '</p>';
308
			}
309
310
			echo $args['after_widget'];
311
			return;

modules/widgets/image-widget.php 1 location

@@ 111-115 (lines=5) @@
108
				</figure>'; // wp_kses_post caption on update
109
			}
110
			echo '<div class="jetpack-image-container">' . do_shortcode( $output ) . '</div>';
111
		} else {
112
			if ( current_user_can( 'edit_theme_options' ) ) {
113
				echo '<p>' . sprintf( __( 'Image missing or invalid URL. Please check the Image widget URL in your <a href="%s">widget settings</a>.', 'jetpack' ), admin_url( 'widgets.php' ) ) . '</p>';
114
			}
115
		}
116
117
		echo "\n" . $args['after_widget'];
118