Code Duplication    Length = 10-17 lines in 2 locations

modules/likes/jetpack-likes-settings.php 1 location

@@ 676-685 (lines=10) @@
673
			$shows = array_values( get_post_types( array( 'public' => true ) ) );
674
			array_unshift( $shows, 'index' );
675
			$global = $this->get_options();
676
			foreach ( $shows as $show ) :
677
				if ( 'index' == $show ) {
678
					$label = __( 'Front Page, Archive Pages, and Search Results', 'jetpack' );
679
				} else {
680
					$post_type_object = get_post_type_object( $show );
681
					$label = $post_type_object->labels->name;
682
				}
683
				?>
684
				<?php if ( $br ) echo '<br />'; ?><label><input type="checkbox"<?php checked( in_array( $show, $global['show'] ) ); ?> name="show[]" value="<?php echo esc_attr( $show ); ?>" /> <?php echo esc_html( $label ); ?></label>
685
				<?php	$br = true; endforeach; ?>
686
		</td>
687
		<?php
688
		/** This action is documented in modules/sharedaddy/sharing.php */

modules/sharedaddy/sharing.php 1 location

@@ 419-435 (lines=17) @@
416
							<td>
417
								<?php
418
								$br = false;
419
								foreach ( $shows as $show ) :
420
									if ( 'index' == $show ) {
421
										$label = __( 'Front Page, Archive Pages, and Search Results', 'jetpack' );
422
									} else {
423
										$post_type_object = get_post_type_object( $show );
424
										$label = $post_type_object->labels->name;
425
									}
426
								?>
427
								<?php
428
								if ( $br ) {
429
									echo '<br />';
430
								}
431
								?>
432
								<label><input type="checkbox"<?php checked( in_array( $show, $global['show'] ) ); ?> name="show[]" value="<?php echo esc_attr( $show ); ?>" /> <?php echo esc_html( $label ); ?></label>
433
								<?php
434
								$br = true;
435
								endforeach;
436
								?>
437
							</td>
438
					<?php