Single_Event::setup_content_controls()
{@inheritdoc}
Source
File: src/Tribe/Views/V2/Customizer/Section/Single_Event.php
public function setup_content_controls() {
$customizer = tribe( 'customizer' );
return [
'post_title_color_choice' => [
'priority' => 5,
'type' => 'radio',
'label' => esc_html__( 'Event Title Color', 'the-events-calendar' ),
'choices' => [
'default' => esc_html__( 'Use General', 'the-events-calendar' ),
'custom' => esc_html__( 'Custom', 'the-events-calendar' ),
],
],
'post_title_color' => [
'priority' => 6, // Should come immediately after post_title_color_choice
'type' => 'color',
'active_callback' => function( $control ) use ( $customizer ) {
$setting_name = $customizer->get_setting_name( 'post_title_color_choice', $control->section );
$value = $control->manager->get_setting( $setting_name )->value();
return $this->defaults['post_title_color_choice'] !== $value;
},
],
'details_bg_color' => [
'priority' => 25,
'type' => 'color',
'label' => esc_html__( 'Event Details Background Color', 'the-events-calendar' ),
'active_callback' => function() {
// Control should not show if the new Single View is enabled.
return ! tribe_events_single_view_v2_is_enabled();
},
],
];
}