Code Duplication    Length = 14-14 lines in 3 locations

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

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