'section' => 'excerpt_settings',
'label' =>
esc_html__( 'On Archive Pages, posts show:', 'twentytwentyone'
),
'choices' => array
( 'excerpt' =>
esc_html__( 'Summary', 'twentytwentyone'
),
'full' =>
esc_html__( 'Full text', 'twentytwentyone'
),
),
) );
// Background color.
// Include the custom control class.
require_once get_theme_file_path( 'classes/class-twenty-twenty-one-customize-color-control.php'
); // phpcs:ignore WPThemeReview.CoreFunctionality.FileInclude.FileIncludeFound
// Register the custom control.
$wp_customize->
register_control_type( 'Twenty_Twenty_One_Customize_Color_Control'
);
// Get the palette from theme-supports.
$palette =
get_theme_support( 'editor-color-palette'
);
// Build the colors array from theme-support.
$colors = array
();
if ( isset( $palette[0
] ) &&
is_array( $palette[0
] ) ) { foreach ( $palette[0
] as $palette_color ) {