Code Duplication    Length = 14-14 lines in 3 locations

modules/custom-post-types/portfolios.php 3 locations

@@ 453-466 (lines=14) @@
450
			'priority'                 => 130,
451
		) );
452
453
		if ( isset( $options[0]['title'] ) && true === $options[0]['title'] ) {
454
			$wp_customize->add_setting( 'jetpack_portfolio_title', array(
455
				'default'              => esc_html__( 'Projects', 'jetpack' ),
456
				'type'                 => 'option',
457
				'sanitize_callback'    => 'sanitize_text_field',
458
				'sanitize_js_callback' => 'sanitize_text_field',
459
			) );
460
461
			$wp_customize->add_control( 'jetpack_portfolio_title', array(
462
				'section'              => 'jetpack_portfolio',
463
				'label'                => esc_html__( 'Portfolio Archive Title', 'jetpack' ),
464
				'type'                 => 'text',
465
			) );
466
		}
467
468
		if ( isset( $options[0]['content'] ) && true === $options[0]['content'] ) {
469
			$wp_customize->add_setting( 'jetpack_portfolio_content', array(
@@ 468-481 (lines=14) @@
465
			) );
466
		}
467
468
		if ( isset( $options[0]['content'] ) && true === $options[0]['content'] ) {
469
			$wp_customize->add_setting( 'jetpack_portfolio_content', array(
470
				'default'              => '',
471
				'type'                 => 'option',
472
				'sanitize_callback'    => 'wp_kses_post',
473
				'sanitize_js_callback' => 'wp_kses_post',
474
			) );
475
476
			$wp_customize->add_control( 'jetpack_portfolio_content', array(
477
				'section'              => 'jetpack_portfolio',
478
				'label'                => esc_html__( 'Portfolio Archive Content', 'jetpack' ),
479
				'type'                 => 'textarea',
480
			) );
481
		}
482
483
		if ( isset( $options[0]['featured-image'] ) && true === $options[0]['featured-image'] ) {
484
			$wp_customize->add_setting( 'jetpack_portfolio_featured_image', array(
@@ 483-496 (lines=14) @@
480
			) );
481
		}
482
483
		if ( isset( $options[0]['featured-image'] ) && true === $options[0]['featured-image'] ) {
484
			$wp_customize->add_setting( 'jetpack_portfolio_featured_image', array(
485
				'default'              => '',
486
				'type'                 => 'option',
487
				'sanitize_callback'    => 'attachment_url_to_postid',
488
				'sanitize_js_callback' => 'attachment_url_to_postid',
489
				'theme_supports'       => 'post-thumbnails',
490
			) );
491
492
			$wp_customize->add_control( new WP_Customize_Image_Control( $wp_customize, 'jetpack_portfolio_featured_image', array(
493
				'section'              => 'jetpack_portfolio',
494
				'label'                => esc_html__( 'Portfolio Archive Featured Image', 'jetpack' ),
495
			) ) );
496
		}
497
	}
498
499
	/**