Code Duplication    Length = 14-14 lines in 3 locations

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

@@ 414-427 (lines=14) @@
411
			'priority'                 => 130,
412
		) );
413
414
		if ( isset( $options[0]['title'] ) && true === $options[0]['title'] ) {
415
			$wp_customize->add_setting( 'jetpack_portfolio_title', array(
416
				'default'              => esc_html__( 'Projects', 'jetpack' ),
417
				'type'                 => 'option',
418
				'sanitize_callback'    => 'sanitize_text_field',
419
				'sanitize_js_callback' => 'sanitize_text_field',
420
			) );
421
422
			$wp_customize->add_control( 'jetpack_portfolio_title', array(
423
				'section'              => 'jetpack_portfolio',
424
				'label'                => esc_html__( 'Portfolio Archive Title', 'jetpack' ),
425
				'type'                 => 'text',
426
			) );
427
		}
428
429
		if ( isset( $options[0]['content'] ) && true === $options[0]['content'] ) {
430
			$wp_customize->add_setting( 'jetpack_portfolio_content', array(
@@ 429-442 (lines=14) @@
426
			) );
427
		}
428
429
		if ( isset( $options[0]['content'] ) && true === $options[0]['content'] ) {
430
			$wp_customize->add_setting( 'jetpack_portfolio_content', array(
431
				'default'              => '',
432
				'type'                 => 'option',
433
				'sanitize_callback'    => 'wp_kses_post',
434
				'sanitize_js_callback' => 'wp_kses_post',
435
			) );
436
437
			$wp_customize->add_control( 'jetpack_portfolio_content', array(
438
				'section'              => 'jetpack_portfolio',
439
				'label'                => esc_html__( 'Portfolio Archive Content', 'jetpack' ),
440
				'type'                 => 'textarea',
441
			) );
442
		}
443
444
		if ( isset( $options[0]['featured-image'] ) && true === $options[0]['featured-image'] ) {
445
			$wp_customize->add_setting( 'jetpack_portfolio_featured_image', array(
@@ 444-457 (lines=14) @@
441
			) );
442
		}
443
444
		if ( isset( $options[0]['featured-image'] ) && true === $options[0]['featured-image'] ) {
445
			$wp_customize->add_setting( 'jetpack_portfolio_featured_image', array(
446
				'default'              => '',
447
				'type'                 => 'option',
448
				'sanitize_callback'    => 'attachment_url_to_postid',
449
				'sanitize_js_callback' => 'attachment_url_to_postid',
450
				'theme_supports'       => 'post-thumbnails',
451
			) );
452
453
			$wp_customize->add_control( new WP_Customize_Image_Control( $wp_customize, 'jetpack_portfolio_featured_image', array(
454
				'section'              => 'jetpack_portfolio',
455
				'label'                => esc_html__( 'Portfolio Archive Featured Image', 'jetpack' ),
456
			) ) );
457
		}
458
	}
459
460
	/**